Unanswered question

Multiple statements in a single SQL Statement action?

I want to be able to execute a stored procedure multiple times from within a single SQL Statement action. Is this possible?

The database is SQL Server. In SSMS I would do something like:
dbo.insert_result <args>;
GO
dbo.insert_results <args>;
GO

I need to do this for every transaction executed by the test, and while it's possible to simply execute the SQL Statement action within a loop, it would (probably) be more efficient to build a large statement and execute it once, than to loop repeatedly.

I've tried writing the same command I'd run in SSMS as the query parameter without success. I've also tried removing the GO keyword and separating the statements with a semi-colon, also without success.

Is there a way this can be done?

Ben R.
Ben R.

Ben R.

Level
0
14 / 100
points

Answers

Fousseyni B.
Fousseyni B.

Fousseyni B.

Level
2
1014 / 2000
points

Hello Ben,

I think you can use a java action program (jar) to execute your SQL Statement.

Best Regards,
Fousseyni B.

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

I've not tried this but it may not be supported with the current custom action. You could use a jar file and call that from a javascript call.