Thu
30
Nov '06
You can use either CAST or CONVERT. Because CAST and CONVERT provide similar functionality.
The difference is CASE is more ANSI standard and use this only if you are writing a program which you will need to use in many database platforms. Where CONVERT is Microsoft specific and more powerful.
Links:
http://msdn2.microsoft.com/en-us/library/ms187928.aspx
http://searchwinit.techtarget.com/tip/0,289483,sid1_gci1014050,00.html
The difference is CASE is more ANSI standard and use this only if you are writing a program which you will need to use in many database platforms. Where CONVERT is Microsoft specific and more powerful.
Links:
http://msdn2.microsoft.com/en-us/library/ms187928.aspx
http://searchwinit.techtarget.com/tip/0,289483,sid1_gci1014050,00.html

Leave a passing comment »