Verifying timestamp and integer datatypes

Database
Enthusiast

Verifying timestamp and integer datatypes

Anyone knows how I can verify if a field of string (varchar) datatype contains a timestamp/integer value?
It exists a built-in sql function (or another language) like ISNUMERIC(varchar) and/or ISTIMESTAMP(varchar) or similar?
I need to delete some rows of a table in which casting operations can fails...
Thanks in advance.
2 REPLIES
Teradata Employee

Re: Verifying timestamp and integer datatypes

You can create a user defined function if you are running V2R6. Teradata provides source code for this - search this site for UDF Oracle.

Otherwise you have to check the entire string. select * from table where substr(foo,1,1) between '0' and '9' and substr(foo,2,1) between '0' and '9' etc....
Enthusiast

Re: Verifying timestamp and integer datatypes

Thanks, I will see.
But there are any function to do the same thing for timestamps?