Re: Insert a string with single quotation marks into a VARCHAR2 field
From: <ekophyne_at_my-deja.com>
Date: Tue, 24 Oct 2000 16:02:26 GMT
Message-ID: <8t4bqb$adl$1_at_nnrp1.deja.com>
M_KEY='DTK' In article <8t47dh$3bj$01$1_at_news.t-online.com>, "STS Oldenburg" <akern_at_sts-systemtechnik.com> wrote:
> I have in a table a field of type VARCHAR2, in which I'd like to
insert a
> value like " M_KEY='DTK' " (without the double quotations marks).
> In the PL *PLUS Worksheet I've tried:
> INSERT col1, col2
> into table
> values ('value1', ' M_KEY='DTK' ');
> This doesn't work because of the single quotation marks.
> What to do?
>
> Thanks for a helpful hint.
>
>
Date: Tue, 24 Oct 2000 16:02:26 GMT
Message-ID: <8t4bqb$adl$1_at_nnrp1.deja.com>
quote the quotes :-
insert into tab (col) values ('M_KEY=''DTK''');
select * from tab;
COL
M_KEY='DTK' In article <8t47dh$3bj$01$1_at_news.t-online.com>, "STS Oldenburg" <akern_at_sts-systemtechnik.com> wrote:
> I have in a table a field of type VARCHAR2, in which I'd like to
insert a
> value like " M_KEY='DTK' " (without the double quotations marks).
> In the PL *PLUS Worksheet I've tried:
> INSERT col1, col2
> into table
> values ('value1', ' M_KEY='DTK' ');
> This doesn't work because of the single quotation marks.
> What to do?
>
> Thanks for a helpful hint.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Oct 24 2000 - 18:02:26 CEST