Stored Procedure for DB Query

Hi Team,
I am trying to execute a insert query (hardcoded) by including it in a Stored procedure using below syntax:
CREATE PROCEDURE <sp_name>
AS
BEGIN
<INS_Query>
END

But it gives a validation error : “Query cannot contain keywords create, update, delete, alter, drop.”
Please guide how to write a SP for Update/Insert queries.

Hi,

Only select operation is supported as part of Stored Procedure

Regards,
Amit

Hi Amit,
Thanks for reply, but in another post reply from your team was to include update query in stored procedure and use ‘Execute DB Query’ with Database Operation=Stored Procedure.

So isn’t there a way we can execute queries other that Select to automate DB Queries ?

Thanks.

Hi Vigantha,

For security purpose only Select and Insert query support has been provided

Regards,
Amit