I recently posted about how we added Countries and Currencies to our free SDU Tools for developers and DBAs. I use those all the time in drop-down lists. But the other one that's super-helpful, is to know which are the official currencies for each country. So we've added another view called CurrenciesByCountry.
It's a simple view that returns details of the current list of official currencies for each country. You can see it here:
For each country, it returns the 3 character country code, and the 3 character currency code.
This can easily be combined with our Countries and Currencies view to get a more complete story:
SELECT c.CountryCode, c.CountryName,
FROM SDU_Tools.CurrenciesByCountry AS cbc
INNER JOIN SDU_Tools.Countries AS c
ON c.CountryCode = cbc.CountryCode
INNER JOIN SDU_Tools.Currencies AS cur
ON cur.CurrencyCode = cbc.CurrencyCode
WHERE c.CountryName = N'Tuvalu';
You can use our tools as a set or as a great example of how to write functions like these.
Find out more
You can see it in action in the main image above, and in the video here:
Access to SDU Tools is one of the benefits of being an SDU Insider, along with access to our other free tools and eBooks. Please just visit here for more info: