Re: [GENERAL] More PostgreSQL conversion fun

2006-04-08 Thread Tony Caduto
I have a varchar field in a table which contains dates in -mm-dd format. The problem is that some have entered invalid dates like 1975-01-00 and I want to convert it to a date field to avoid this nonsense. Is there a way to test for failure of a type conversion and insert a NULL on failure

Re: [GENERAL] More PostgreSQL conversion fun

2006-04-08 Thread Guy Rouillier
Nick Wiltshire wrote: > Hi all, > > I have a varchar field in a table which contains dates in -mm-dd > format. The problem is that some have entered invalid dates like > 1975-01-00 and I want to convert it to a date field to avoid this > nonsense. Is there a way to test for failure of a type c

[GENERAL] More PostgreSQL conversion fun

2006-04-08 Thread Nick Wiltshire
Hi all, I have a varchar field in a table which contains dates in -mm-dd format. The problem is that some have entered invalid dates like 1975-01-00 and I want to convert it to a date field to avoid this nonsense. Is there a way to test for failure of a type conversion and insert a NULL on