cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect syntax near

Former Member
0 Kudos

Hello guys:

I have two questions,

1.) 

I want to use EXEC for two different SQL statement at the same EXEC string

Ex :

create procedure INVENTORY.Henry_Test3 language SQLSCRIPT AS

BEGIN

EXEC ('INSERT INTO Henry_TestTable(Henry_TEXT, Henry_ID)

VALUES

(22,22) ; INSERT INTO Henry_TestTable(Henry_TEXT, Henry_ID)

VALUES

(23,23)');

END

When I execute this procedure,  I got an error message:

Could not execute 'CALL INVENTORY.HENRY_TEST3'

SAP DBTech JDBC: [2048] (at 27): column store error: search table error:  [2620] executor: plan operation failed;INVENTORY.HENRY_TEST3: line 3 col 1 (at pos 69): SQLError exception: sql syntax error: incorrect syntax near ";": line 3 col 7 (at pos 67)

2).

I want to use a procedure to create another procedure

EX:

create procedure INVENTORY.Henry_Test4 language SQLSCRIPT AS

BEGIN

EXEC ('create procedure INVENTORY.Henry_Test2 language SQLSCRIPT AS

BEGIN

EXEC (''Select * from My_LOG''); 

End');

END

But I also got an error message:

Could not execute 'CALL INVENTORY.HENRY_TEST4'

SAP DBTech JDBC: [2048] (at 27): column store error: search table error:  [2620] executor: plan operation failed;INVENTORY.HENRY_TEST4: line 3 col 1 (at pos 69): SQLError exception: feature not supported: create proc with ddl autocommit off mode is not supported

Could anyone help me to solve these problems?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Henry,

This seems like the same question you already posted here: http://scn.sap.com/thread/3241330

Please can you delete this thread if this is the case.

Kind regards,

Danielle