Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

validate whether cast will work or not - forum topic by monschke

$
0
0

Is there a function to check whether a cast will work for individual records?  Currently, if one record in a set will fail a cast, the complete SQL will fail with error such as:  "SELECT Failed. 2621:  Bad character in format or data of TABLE.COLUMN."
 
Is there function like the following ones defined below that could do this check per record  (a function that returns 0 or 1 per record per success/failure)?  We could then delete or filter out those records before running actual cast.
1)   isCastValid(COLUMN, "type")
2)  isValid(cast(COLUMN as <type>))
3)   or some other option
 
If not, is there something in the Teradata APIs that will help support a UDF such as this?   Thanks.

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>