Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sql Stament error
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