Home » SQL & PL/SQL » SQL & PL/SQL » setting a field to contain the word end?
setting a field to contain the word end? [message #1660] Mon, 20 May 2002 06:39 Go to next message
Patrick Boersma
Messages: 2
Registered: May 2002
Junior Member
I'm trying to update some fields in a database
using SQL to contain phrases with the word "end"
in them, such as extend, friend or bend. The
command I am using is:

update table set comment='extended front panel'
where filename='xxxxx';

but the command won't work for any word
containing the word end. is there a way to get
around this?
Re: setting a field to contain the word end? [message #1661 is a reply to message #1660] Mon, 20 May 2002 06:49 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
use % and like operators to do a wildcard search.

------------------------------------
SQL> ED
Wrote file afiedt.buf

1* select ename from e where ename like ('%LL%')
SQL> /

ENAME
----------
ALLEN
MILLER

SQL> update e set ename='changed' where ename like ('%LL%');

2 rows updated.

SQL> select ename from e where ename like ('%LL%');

no rows selected

SQL> select ename from e where ename like ('%changed%');

ENAME
----------
changed
changed

SQL>
Re: setting a field to contain the word end? [message #1663 is a reply to message #1660] Mon, 20 May 2002 06:56 Go to previous message
Patrick Boersma
Messages: 2
Registered: May 2002
Junior Member
sorry, I mean I'm trying to insert a word into the
field. Just words containing the word end in them
won't work, since it's a reserved word. If I use any
other word it'll work ok.
Previous Topic: table to text conversion
Next Topic: How To Access Customized Query in Stored Procedure ?
Goto Forum:
  


Current Time: Thu May 09 18:33:40 CDT 2024