Home » SQL & PL/SQL » SQL & PL/SQL » escape ' char
escape ' char [message #19864] Mon, 15 April 2002 05:07 Go to next message
Bella
Messages: 2
Registered: April 2002
Junior Member
I have the following table:
create table t1(
name CHAR(30) not null,
criteria varchar(515) not null,
PRIMARY KEY (name)
);

And I should insert the following row:
insert into t1 values('aa','severity='critical' and')
pay attantion that critical should be between 's.
I tried to SET ESCAPE "" and use:
insert into t1 values('aa','severity='critical' and'),
but it doesn't works.

Please, help.
Thanks,
Bella
Re: escape ' char [message #19866 is a reply to message #19864] Mon, 15 April 2002 06:17 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
is this what you are expecting?
----
SQL> create table t1(
2 name CHAR(30) not null,
3 criteria varchar(515) not null,
4 PRIMARY KEY (name)
5 );

Table created.

SQL> insert into t1 values('aa','severity='critical' and')
2 ;
insert into t1 values('aa','severity='critical' and')
*
ERROR at line 1:
ORA-00917: missing comma

SQL> ed
Wrote file afiedt.buf

1* insert into t1 values('aa','severity=''critical'' and')
2 /
1 row created.

SQL> select * from t1
2 ;

NAME
------------------------------
CRITERIA
--------------------------------------------------------------------------------
aa
severity='critical' and
Previous Topic: how can transfer a column into a row with a single SELECT?
Next Topic: SQL Date Select for a range
Goto Forum:
  


Current Time: Thu Apr 25 11:52:16 CDT 2024