Hi I understand the majority and my query works but could somebody explain to me what the ",1)" represents in the select statement please?
CONVERT(VARCHAR(50),CAST(SUM(Amount) as MONEY),1)
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manish Kumar ChoudharyPosted Nov 28, 2014, 11:10 PM
Hi Anthony Clarke,
Read these links it helps you
http://technet.microsoft.com/en-us/library/ms187928%28v=sql.105%29.aspx
https://www.simple-talk.com/sql/t-sql-programming/data-conversion-in-sql-server/
VulpesPosted Nov 28, 2014, 4:16 PM
It means that, when doing the conversion, commas should be inserted every three digits to the left of the decimal point, and there should be two digits to the right of the decimal point.
For a full list of styles when using CONVERT or CAST, check this link:
http://msdn.microsoft.com/en-us/library/ms187928.aspx