I’m writing to a MS SQL database and in that instance I need to get the inserted ID returned.
I need something like this:
INSERT INTO table (name)
OUTPUT Inserted.ID
VALUES('bob');
Please help.
I’m writing to a MS SQL database and in that instance I need to get the inserted ID returned.
I need something like this:
INSERT INTO table (name)
OUTPUT Inserted.ID
VALUES('bob');
Please help.
Insert query returns the number of inserted rows into a table.
I am not sure if that is yet supported in the uipath.
Run another query (Execute query)
SELECT SCOPE_IDENTITY()
To get the recently inserted ID.
Regards,
Karthik Byggari
I would really like to avoid 2 queries, because if we are running on multiple robots then we might get an issue getting the actual inserted ID.
Thanks!
This is the supported output as per the documentation -
You should create parameterised query to get the output.
Regards,
Karthik Byggari
Thanks KarthikByggari,
Do you have an example? I can’t make the parameters work.
Regards
Leif
These parameters works if you are running the stored procedure.
In your case, you have to create a stored procedure with IN and OUT parameters.
Regards,
Karthik Byggari
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.