Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A substr question
> anybody can help, I come across a problem while using the following sql
>that for data extraction.
>
>UPDATE TEST SET COL2 = (SUBSTR(COL1,1,1));
> *
>ERROR at line 1:
>ORA-01722: invalid number
>
>while COL2 is number(1) and COL1 is Char(4) like 2X.9 or 6K.0 that I want to
>extract the first number i.e. 2 and 6 from COL1 to COL2.
>
>Anybody help???
>
>Thanks,
>Elton
Elton,
UPDATE TEST SET COL2 =TO_NUMBER( (SUBSTR(COL1,1,1))); I think this would solve the problem..
Ash. Received on Thu May 14 1998 - 12:57:46 CDT
![]() |
![]() |