Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with insert
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 CST
>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;
>/
>
![]() |
![]() |