Hi Guys
Im trying to build up a string within a DBP and want add quotes to the
string.
I need to escape single quotes. Does anyone know how to do this?
I have tried \'string\' escape '\' and this doesnt work !
Any help appreciated
Jeff
Roy Hann - 28 Aug 2006 13:15 GMT
> Hi Guys
> Im trying to build up a string within a DBP and want add quotes to the
[quoted text clipped - 3 lines]
>
> Any help appreciated
In many languages single quotes are escaped by doubling them up; Ingres SQL
follows the same convention (the '''' is a single single quote quoted by
single quotes):
create procedure hi as
declare msg varchar(30) not null;
begin
msg='Roy'+''''+'s holiday is over';
message :msg;
end;
execute procedure hi;
gives me
MESSAGE 0: Roy's holiday is over
Roy
Jean-Pierre Zuate - 28 Aug 2006 13:17 GMT
Hi,
To add a quote try 4 quotes ('''').
Hope this help ...
Jean-Pierre
28 Aug 2006 04:43:20 -0700, jeffrey.duffy@gro-scotland.gsi.gov.uk <
jeffrey.duffy@gro-scotland.gsi.gov.uk>:
> Hi Guys
> Im trying to build up a string within a DBP and want add quotes to the
[quoted text clipped - 9 lines]
> Info-ingres@cariboulake.com
> http://mailman.cariboulake.com/mailman/listinfo.py/info-ingres

Signature
Jean-Pierre Zuate
+33(0)6 11 40 11 09