Skip to Content
0
Jun 08, 2018 at 02:33 PM

hana dynamic sql help

168 Views

Hi All,

I am bulding a below dynamic sql in hana stored procedure, can some one help what is the issue on the below syntax

exec ( 'ALTER TABLE ' || schema_name || '."' || table_name || '" add (' || column_name ||'1' || col_type || ')');

It throws me

line 34 col 1 (at pos 1240): [257] (range 3) sql syntax error exception: sql syntax error: incorrect syntax near ")": line 1 col 54 (at pos 54)