> Bad dates like 02/31/2006 will be converted to sane dates.

Actually, that's the core of the direct query!

select * from foo where to_date(olddate,'YYYY-MM-DD')::text <> olddate;

The format of the exported dates matches the default date::text format
because I specified the export that way. If not, the query would be a little
more complicated by having to specify the format, but the same basic idea
still would work.

Which is good, since I'm now on to a table that has 108 bogus dates. I'd
hate to find & fix them one at a time...

-- 
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to