Skip to main content

validate an XML date using a SQL Function

  • June 10, 2014
  • 0 replies
  • 4 views

Bruce_H
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?