|
|
Archives of the TeradataForum
Message Posted: Mon, 10 Jun 2013 @ 16:27:48 GMT
Subj: | | Re: Selecting single quotes within dynamic SQL |
|
From: | | de Wet, Johannes M |
The following might work for your purposes. I know the long string of quotes look weird, but the following appears to embed the quotes
correctly in the Dynamic SQL. There might be other ways to do this too.
REPLACE PROCEDURE charinstest
( )
L1:
BEGIN
CALL DBC.SYSEXECSQL (
'INSERT INTO ud_gem_ad.proctest
(charval)
select ''''''''||TRIM(charval)||'''''''' FROM chartest; ') ;
END L1;
Thanks,
Johannes de Wet
Unum
| |