convert(varchar,convert(money,m.[FirstTier]),1) as 'First Tier',
m.firsttier = '1583456'
after conversion = '1,583,456.00'
Is there any easy way to not have the '.00'?
Thanks.this trick should do:
parsename(convert(varchar,convert(money,m.[FirstTier]),1),2) as 'First Tier'|||That worked... thanks!
|||Note that PARSENAME returns unicode string so you need to be careful when using that expression in WHERE clause for example. (for example if the column against which you are comparing is indexed and it is varchar , then with this expression the column will be converted to unicode) On the other hand, if this is for display purposes then it is better done in the client-side. Doing it on the client-side, you can handle other regional settings also.
No comments:
Post a Comment