Link to home
Start Free TrialLog in
Avatar of jclemo
jclemo

asked on

Divide the results of two queries

I'm not sure what I'm doing wrong here.. I have these two queries and both return positive values in the 1k+ range on their own.  The first returns a value of 1277  and the second returns a value of 6559.  However, when I try to divide them to return a percentage I get 0, if I do the math on a calculator I get
0.194, which is the value I actually want.  I'm sure it's something simple so thanks in advance.  

SELECT Unassigned/Total FROM
(SELECT COUNT(IPAddress) Unassigned FROM Assets INNER JOIN
Contacts ON Assets.BusID = Contacts.BusID WHERE Business_Contact = 'NOT_ASSIGNED') AS TEMP1,
(SELECT COUNT(IPaddress) Total FROM Assets) AS TEMP2;
ASKER CERTIFIED SOLUTION
Avatar of Binuth
Binuth
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jclemo
jclemo

ASKER

heh.. I knew it was simple.. thanks for the help Binuth.