sql - Check date value in Netezza -


in netezza , trying check if date value valid or not ; isdate function in sql server.

i getting dates 11/31/2013 not valid, how in netezza can check if date valid exclude them process.

thanks

i don't believe there built-in netezza function check if date valid. may able write lua function this, or try joining "date" lookup table, so:

create table 2 columns:

date_value date date_string varchar(10) 

load data table valid dates (generate file in favorite tool, excel, unix, whatever). there can more 1 row per date_value (different "valid" formats) if use this check. if fill in from, say, 1900 2100, long data within range, you'll fine. , it's small table, too, ~200 years ~7300 rows. add more if needed. heck, since nz date datatype goes ad1 ad 9999, fill 3.4 million rows (small nz).

then, isolate rows have invalid dates, use join or exists / not exists table, on date_string. since table small, netezza broadcast spus, making performance impact trivial.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -