@muriel.schmidt
To check if a decimal value is valid in Teradata, you can use the following approach:
Here is an example of how you can check if a decimal value is valid in Teradata:
1 2 3 4 5 6 7 8 |
SELECT CASE WHEN MyDecimalColumn IS NULL THEN 'Invalid' WHEN MyDecimalColumn NOT BETWEEN -999999999999999.99999999999999 AND 999999999999999.99999999999999 THEN 'Invalid' WHEN ISNUMERIC(CAST(MyDecimalColumn AS VARCHAR)) = 0 THEN 'Invalid' ELSE 'Valid' END AS DecimalValidity FROM MyTable; |
In this example, replace MyDecimalColumn with the name of the column containing the decimal value you want to check, and MyTable with the name of the table containing the column. The query will return 'Valid' if the decimal value is within the allowed range and contains only valid characters, and 'Invalid' otherwise.