Casting problem in SQL

VIVEKANANDHAN_PERIASAMY
VIVEKANANDHAN_PERIASAMY used Ask the Experts™
on
select id from cast((SUM(interger))/3600 as float)
from table
group by id

It just displaying in int. I need it to be display in float/decimals
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
just do the casting before divide:
select id from cast((SUM(interger)) as float)/3600
from table
group by id
Ephraim WangoyaSoftware Engineer

Commented:
try

select id from SUM(interger)/3600.0
from table
group by id

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial