Microsoft
Software
Hardware
Network
Question : How do I divide two integer values and get a result that includes 2 decimal places?
I have what seems to be a very easy problem, but it isn't working for me. I have a table with two integer value columns (A and B). I simply want to create a new table with a new column (C) that divides column A by column B and gives me a result in a rate or percentage form.
For example, row 1 may contain 4 for column A and 16 for column B. I would expect my new computed column C to show .25 (4/16) or 25 (4.16*100).
I have used several combinations of CAST, ROUND, CONVERT with DECIMAL and NUMERIC, but can't get the correct result. I can't wait to see the simple solution.
Thank you so much.
Answer : How do I divide two integer values and get a result that includes 2 decimal places?
integer divided by integer always results in integer, so 4/16 will give you always 0
but you can do it like this
select 4*1.0 / 16
Random Solutions
I am using Embarcadero Rapid SQL 7.5.5 to connect to sybase 12.0 database and i can see all the tables there.How to export those tables into .csv file.Can you please tell me the step by step procedure
Microsoft, Ghost, XP, SERVER2003
Converting Common file formats to TIFF(For FAX)
sybase striped .dmp load
Outlook double appointment
I cannot open internet explorer a buffer overrun detected message appears
How Do I Select UNDI Driver in Ghost Solution Suite?
Spry Widget Styles Lost After HTML Reloaded by AJAX Method: How Do I Fix It?
ouput when starting perl-script with at-command
USB not working?