Select Scope_Identity()

0
Hi colleagues,   I am trying to retrieve the Id of the row inserted through Execute statement with the Database Connector in a SQL Database but I am not able, I only get the number of file inserted, in my case, always 1. I put the sentence in the same action such as ‘’INSERT INTO XXXX….;SELECT Scope_Identity()” but it doesn’t work fine. I have tried to put first a Execute Statement and then a Execute Query with the SELECT Scope_Identity() and it doesn't work either.   Do you have any idea?   Thanks in advance. Mario.
asked
2 answers
0

This is db dependent and yours looks like MSSQL. For postgres use this

answered
0

The question is that returns a list and not a unique value. I’ve resolved doing a execute query and handling the list result.

 

Thanks a lot.

answered