troubleshooting Question

How do I Convert float to money or decimal in sql query?

Avatar of Chris Michalczuk
Chris MichalczukFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft SQL ServerSQL
9 Comments1 Solution78 ViewsLast Modified:
How do I convert the 2 fields in this to money or decimal 2 . The results are not right as I think this is because both fields are FLOAT.
How do I convert them in the query to say MONEY or DECIMAL as 2 decimal places?

Select I.Invoice_Number, I.Items_Net, Sum(II.Net_Amount) Value,i.INVOICE_TYPE
From Invoice I
  Inner Join Invoice_Item II on I.Invoice_Number = II.Invoice_Number
Group By I.Invoice_Number, I.Items_Net,i.INVOICE_TYPE
having Sum(II.Net_Amount)<>I.Items_Net
Order By I.Invoice_Number
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 9 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 9 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004