We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


validate an XML date using a SQL Function — Vertica Forum

validate an XML date using a SQL Function

I'm writing a SQL function that will be called in a large SQL batch after data has been loaded into Vertica. I need to check whether or not a string field is a date. But when I try val::Timestamp or TO_Timestamp(val) or TO_TimeStamp_TZ(val), an ERROR is returned. Is there a way to validate a date instead of receiving a cast error?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file