Here is a sample code
declare @Currency table (ccy char(3),amount money)
insert into @Currency
values ('USD',12.34), ('AUD',12.34), ('INR',12.34)
I need to show the output as below,
when ccy = 'USD' then 12 (No decimals- cut off after decimal values)
when ccy = 'AUD' then 12.34 (Two decimals)
when ccy = 'INR' then 12.3400 (Four decimals)
Expected Output:
ccy amount
USD 12
AUD 12.34
INR 12.3400
Please advice how do I achieve this in Tsql.