Re: Help with insert
From: Alan D. Mills <alanm_at_uk.europe.mcd.mot.com>
Date: 1998/11/17
Message-ID: <72ro3n$n29$1_at_schbbs.mot.com>#1/1
Date: 1998/11/17
Message-ID: <72ro3n$n29$1_at_schbbs.mot.com>#1/1
If I understand you correctly you simply want to insert a string with the ' character in it.
All you need to do when populating your varchar2 variable is to 'escape' the ' with a second one. i.e.
var := 'Alan''s Code Example';
will populate the varaibel with the string "Alan's Code Example" whcih youcan simply use as part of your insert statement.
-- Alan D. Mills Diego Pafumi wrote in message <3650A76D.D35BA715_at_us.oracle.com>...Received on Tue Nov 17 1998 - 00:00:00 CET
>I'm trying to create a varchar containing the ' character to be inserted in
a
>table, but I receive an error.
>What I'm doing is:
>
>declare
> var varchar2(20);
>begin
> var := 'a';
> var := var || ''b'';
> insert into table values (var);
>end;
>/
>