Be sure to review our Idea Submission Guidelines for more information!
Submission GuidelinesWhen I perform data type conversions I sometimes receive conversion errors. There is not a slick way to programmatically handle these that I am aware of. Instead, I have to manage them with half a dozen tools or really unsightly expressions in formula tools. As an example, I have a string field with a value "two" and I want to convert to a decimal or int. I receive a conversion error and the value is either "0.000" or "0". This is clearly wrong and I want to have a NULL value instead. I want to use a function to attempt the conversion in the formula tool so i can nest it inside conditionals in a cleaner fashion.
Here is a reference to the try_cast doc:
https://docs.microsoft.com/en-us/sql/t-sql/functions/try-cast-transact-sql?view=sql-server-2017
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.