SQL SERVER Try Convert

SQL SERVER Try Convert

Select TRY_CONVERT(int,123456) , TRY_CONVERT(int,'Char to NUmber')  , TRY_CONVERT(int,'00000111')  , TRY_CONVERT(int,'1234ACEF')  




Instead of throwing error it will return Null



Select TRY_CONVERT(Date,'12/24/2015'),  TRY_CONVERT(Date,'12242015') 




Instead of throwing error it will return Null

Comments

Popular posts from this blog

Rebuild Index

Exclude property of Class Object from Serialization

Multiple Connection from Config File