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: QUESTION - "Rulebook" for character delimiting...??

Re: QUESTION - "Rulebook" for character delimiting...??

From: <fitzjarrell_at_cox.net>
Date: 7 Jun 2006 12:27:46 -0700
Message-ID: <1149708466.452530.29750@i39g2000cwa.googlegroups.com>

chris.hulan_at_gmail.com wrote:
> double-quotes inside single-quotes should work:
>
> select 'a "test" b' from dual;
>
> 'A"TEST"B'
> ----------
> a "test" b

Unless double quotes are used to delimit the entire string, such as in php, asp, etc. Then such constructs would prematurely terminate the text:

sqlStr="select 'a "test" 'b' from dual";

would not work. There is an alternative:

sqlStr="select 'a '||chr(34)||'test'||chr(34)||' b' from dual";

Yes, it's a long way around the pool, but it will work when a programming language requires strings to be enclosed in double quotes:

SQL> select 'a '||chr(34)||'test'||chr(34)||' b' from dual;

'A'||CHR(3



a "test" b

My two cents.

David Fitzjarrell Received on Wed Jun 07 2006 - 14:27:46 CDT

Original text of this message

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