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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Nov 28, 2014, 11:16 AM EST
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
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 28, 2014, 6:10 PM EST
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/