on 06-21-2016 3:51 PM
Hi All,
I have a stored procedure with logic like as follows. I am getting an error like "
sql syntax error: incorrect syntax near ":lt_mara": line 201 col 2" |
lt_mara = select * from MARA where matnr like 'PART%' ;
delete from :lt_mara where matnr = 'PART-AB';
I am trying to delete a particular set of records from temporary table based on condition.
Is this possible in SAP HANA ? will it work only for query on DATABASE TABLE rather than temporary table ?
I agree there is an alternate way to select from LT_MARA where MATNR <> PART-AB .
I want to know why the delete does not work ? Is it because the lt_mara was created at runtime, the compiler giving error for delete statements ?
Thanks,
Gokul
Hello Gokul,
SQLScript does not support a DELETE for "internal" tables. It is just supported for catalog/repository tables.
A way you can simulate the delete in your situation is to do an additional select on the "internal" table, like e.g.:
lt_mara = select * from :lt_mara where martnr <> 'PART-AB';
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.