Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL TO_DATE

Re: SQL TO_DATE

From: Venkat <veeve_2000_at_yahoo.com>
Date: Mon, 25 Aug 2003 19:39:13 -0700
Message-ID: <0Rz2b.21$V06.273@news.oracle.com>

Do a TRANSLATE on the second SUBSTR().

Example from the doc:

SELECT TRANSLATE('2KRW229',
   '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')    "Translate example"
     FROM DUAL;   Translate example



2229

Cheers,
-V

on 8/25/2003 7:16 PM Randy Harris said the following:

>I hope someone can help me with a SQL question. I'm attempting to construct
>a date, I have week start dates in the table:
>
>Aug 18
>Aug 25
>Sep 1H
>Sep 8
>
>However, the data can be immediately followed by other characters (Sep 1H).
>I'm trying to construct a date with this:
>
>TO_DATE(SUBSTR(Weekstart, 1,3) || ' ' || SUBSTR(Weekstart, 5,2) || ',' ||
>Year, 'MON DD, YYYY')
>
>This works fine until it hits the Sep 1H date. How can I get around this?
>
>Thanks for your help
>
>
>
>
Received on Mon Aug 25 2003 - 21:39:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US