dbQuery with multiple statements

How can I get this Sql Server dbQuery to work? The INSERT is completing fine, but I need to get the inserted identity PK and Arc is not picking it up.

<arc:set attr="db.query">	insert into table (...) values (...);  	select SCOPE_IDENTITY();</arc:set><arc:call op="dbQuery" in="db" out="results">  ...

Is there a better way to get the identity?

(I have to use ArcScript, the upsert connector is not an option)

Hi Tavis,

The updated script would look like below:

<arc:set attr="db.query">	insert into table (...) 	OUTPUT INSERTED.<columnName> values (...); </arc:set><arc:call op="dbQuery" in="db" out="results">  ...

Here the column name refers to the PK column or any column you would like return on successful insert.

Let me know if this works for you?