Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STARNGE DIVISION PROBLEM

Status
Not open for further replies.

pwel

Programmer
Aug 18, 1999
79
GB
Hi,

I have a simple division statement in a stored procedure that just keeps returning 0????

I have a temp variable

@temp2 decimal(18,2)

All I am trying to do is a simple division.

select @temp2 = (54/100)

Which should retuen 0.54, but it refuses to work, i just keep getting 0.00

Any ideas, am I missing something simple here?

Thanks in advance.

PW.

Paul Welding
Web Developer
 
DDDDDDOOOOOOOGGGGGHHHHHHHHHHH !!!

Sorted it now, all it was: -

54.00 / 100.00

You have to provide the fractional part, else it gets truncated.

Cheers anyway.

Paul Welding
Web Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top