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

Home -> Community -> Usenet -> c.d.o.server -> Re: Sql Stament error

Re: Sql Stament error

From: Anurag Varma <avdbi_at_nospam.hotmail.com>
Date: Thu, 06 Sep 2001 18:49:41 GMT
Message-ID: <9zPl7.1957$tb.335351@news02.optonline.net>


You can't use
where = 'PMTK%'
since oracle will take % literally rather than as a wildcard character.

One way is

update table
set columnA = 'TMTK' || substr(columnA, 5) where columnA LIKE 'PMTK%'
/

Anurag

"Joshua Goodstein" <awing_pilot_at_yahoo.com> wrote in message news:924a90f8.0109061039.1e8d7a46_at_posting.google.com...
> I have a table with a column ( columnA) it contains the values
> TRTK-1234567890
>
> I want to update the values so that TRTK becomes PMTK i tried the
> following and it failed:
>
> update table
> set columnA='TRTK%'
> where columnA='PMTK%';
>
> 0 rows updated
> argg I know this is a menial thing but just frustrating
>
> Thanks in advance
>
> J
Received on Thu Sep 06 2001 - 13:49:41 CDT

Original text of this message

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