Forum Discussion

sgauthier's avatar
sgauthier
New Contributor
13 years ago

Using multiple SQL inserts in datasink step

Hi,

I'm using a JDBC datasink in a test case and it works fine until I try to add another SQL insert.

e.g.

insert into table1
SET TestDataID=?,
Name=?,
Phone=?;

works fine (I have the necessary properties to populate these fields)

However, when I add another SQL insert...

insert into table1
SET TestDataID=?,
Name=?,
Phone=?;
insert into table2
SET Age=5;

soapUI PRO keeps reporting:

"ERROR:An error occured [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert into table2 set name=123' at line 12], see error log for details"

and

"ERROR:An error occured [SQL problem occured], see error log for details"

(I tried to check the logs but didn't see any in the ..\soapUI-Pro-4.5.1\bin folder.)

The two SQL statements run together fine in MySQL

Is this not supported or am I missing something?

Thanks,
Steve

1 Reply

  • sgauthier's avatar
    sgauthier
    New Contributor
    UPDATE: Was able to accomplish this with a Groovy script but still curious if a DataSink can be used.