In SQL how can I get a mathematical expression to give me a double instead of a truncated int?

You are encountering integer division. You need to ensure one of the operands is not an integer. E.g.As below.

You are encountering integer division. You need to ensure one of the operands is not an integer. E.g.As below.

Select top 10 id, (select COUNT(*) / 100.0 from table1) from table2.

Ah, duh. I was thinking I needed to use some Double() method or something. Thanks a bunch.

– Andrew. S Jan 5 at 1:23 you can use Cast(Count(*) as float) * CAST(100 as float), but the answer below does the same thing – Traci Jan 5 at 1:42.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions