Converting Strings w/different date-like formats

From: Andrew McConnell <mcconnel_at_source.asset.com>
Date: 19 Dec 1994 13:49:01 -0500
Message-ID: <3d4kit$9c8_at_source.asset.com>


I've inherited a data model that has date information stored in varchar2 fields. I want to convert them all to date formats - but I have a problem.... Surprise! The formats for the strings are inconsistent, more specifically:

Row 1: 11-NOV-94
Row 2: 20-FEB-1993

My select stmt:
  'select to_date(subscription_date'DD-MON-YY') from test' blows up b/c the date format doesn't match Row 2.

So how can I use the to_date function on all of the rows to massage the strings onto the DD-MON-YY format?

TIA

-- 
Andrew McConnell             "Ford!" he said, "there's an infinite number of
Voice: (304) 594-9819      monkeys outside who want to talk to us about this 
FAX:   (304) 594-3951      script for 'Hamlet' they've worked out."
mcconnel_at_source.asset.com                                    -- Arthur Dent
Received on Mon Dec 19 1994 - 19:49:01 CET

Original text of this message