Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Nested speech marks in sql insert

Re: Nested speech marks in sql insert

From: TurkBear <johng_at_mm.com>
Date: Wed, 02 Feb 2000 18:06:25 GMT
Message-ID: <389a6f83.163117580@204.181.81.99>

Use " for the string inside the ' so: insert into db1 values(12, 15, 'insert into db2 values(1,2,'insert into db2 values (1,2,"Fred Bloggs");');
Like this:



SQL> create table test_insert(
  2 f1 number,
  3 f2 number,
  4 f3 varchar2(50));

Table created.

SQL> insert into test_insert values(1,2,'insert into db2 values(1,2,"Fred Boggs");');

1 row created.

SQL> select * from test_insert
  2 ;

       F1 F2 F3

--------- --------- --------------------------------------------------
        1         2 insert into db2 values(1,2,"Fred Boggs");


---------------------------------------------------------------------------------------------------------------

Hope it helps...

kevin <kev_at_nexuscomp.co.uk> wrote:

>I have an oracle database
>i am inserting SQL statements into it.
>I have a line
>
>insert into db1 values(12, 15, 'insert into db2 values(1,
>2,'Fred Bloggs');');
>
>any ascii value equivalent that will work
>for nested '
>
>thankyou
>
>
>* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------    http://www.newsfeeds.com The Largest Usenet Servers in the World! ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==----- Received on Wed Feb 02 2000 - 12:06:25 CST

Original text of this message

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