All Forums Database
kishorkp2 1 post Joined 02/13
25 Feb 2013
string not terminated error

 

Hi all, 

 

am getting '3760:string not terminated' error. i am using dynamic resultset for output. it failed at below point.plz suggest 

 

 

SET V_STMT1 = 'select status,

 

SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**7) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**6) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**5) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**4) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**3) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**2) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**1) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_lower_int / (16**0) MOD 16 + 1 FOR 1) as ip_lower,

 

SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**7) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**6) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**5) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**4) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**3) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**2) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**1) MOD 16 + 1 FOR 1) ||

  SUBSTRING(''0123456789ABCDEF'' FROM ip_upper_int / (16**0) MOD 16 + 1 FOR 1) as ip_upper,

  total_accts, 

 

cast(OREPLACE(cast(frd_acct_rt as varchar(5)),''.'','' '') as varchar(24))||IDN_REPLICATE(''0'',4- CHARACTERS(cast(OREPLACE(cast(frd_acct_rt as varchar(5)),''.'','' '') as varchar(24)))) frd_acct_rt,

ip_src, 

block_flg

from vt_ip_db;'

KS42982 137 posts Joined 12/12
25 Feb 2013

Try SUBSTR instead of SUBSTRING, that might solve your issue.

Fred 1096 posts Joined 08/04
26 Feb 2013

Is there a semicolon after the last apostrophe as well as before?

You must sign in to leave a comment.