String scalar Function in ms sql2005
Can someone help me with a function?
I have some sql:
SELECT depositReceivedCurrency ,SUM(depositReceivedAmount) AS currencyAmount
FROM dbo.tbTrades
WHERE clientID = 1 AND depositReceivedCurrency IS NOT NULL
GROUP BY depositReceivedCurrency
That returns a table like so:
EUR 35459.00
GBP 1000.00
Note: there could be more than 2 currencies
I would like a function that would take this table and out put a string like this:
"EUR 35459.00 / GBP 1000.00" [ + / ith currency amount]
Possible? here's a chance to show off
![]()
