I have an SQL database which contains a table with four different currency columns, I need to determine how many different currencies each record has across these four columns, for example..
| Record ID | Curr1 | Curr2 | Curr3 | Curr4 | CurrencyCount |
|---|---|---|---|---|---|
| 1 | GBP | USD | GBP | GBP | 2 |
| 2 | GBP | EUR | GBP | USD | 3 |
| 3 | GBP | GBP | GBP | GBP | 1 |
| 4 | GBP | GBP | GBP | EUR | 2 |
How can I determine the "CurrencyCount" / count of currencies against each record? I can't think how to approach this
Thank you for any help