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: Dumb Question, how to insert ' into varchar2 field

Re: Dumb Question, how to insert ' into varchar2 field

From: Anurag Varma <avoracle_at_gmail.com>
Date: 15 Feb 2005 10:26:43 -0800
Message-ID: <1108492003.805494.202730@l41g2000cwc.googlegroups.com>


Norm,

Yes you are correct. This behavior reminds me as being similar to how perl does the quoting.

But to run some tests:

ORA10.1> select q'{abcd ' efgh}' from dual;

Q'{ABCD'EFGH}'



abcd ' efgh

ORA10.1> select q'[abcd ' efgh]' from dual;

Q'[ABCD'EFGH]'



abcd ' efgh

ORA10.1> select q'=abcd ' efgh=' from dual;

Q'=ABCD'EFGH='



abcd ' efgh

ORA10.1> select q''abcd ' efgh'' from dual;

Q''ABCD'EFGH''



abcd ' efgh

ORA10.1> select Q'{abcd ' efgh}' from dual;

Q'{ABCD'EFGH}'



abcd ' efgh

ORA10.1> select q'<abcd ' efgh>' from dual;

Q'<ABCD'EFGH>'



abcd ' efgh

ORA10.1> select q'<abcd ' efgh?' from dual; ERROR:
ORA-01756: quoted string not properly terminated

ORA10.1> select q'(abcd ' efgh)' from dual;

Q'(ABCD'EFGH)'



abcd ' efgh

Anurag Received on Tue Feb 15 2005 - 12:26:43 CST

Original text of this message

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