Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 10 Jun 2013 @ 16:27:48 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 23 Jun 2019