You are viewing limited content. For full access, please sign in.

Question

Question

Could LF add a SELECT_IDENTITY statement to Insert Data activities?

asked on May 13, 2015

Currently, if I Insert Data in to a table and there is a column that acts as the Identity Provider, the only way I can get that Identity back is if I do a separate Query Data to find the row I just inserted.

This is not ideal, since I may not be able to make a Query that is totally unique to the Identity I just created.

An option to have the same Insert Data activity perform

SELECT SCOPE_IDENTITY()

would also be useful, as this will return the value of the Identity Providers as a token from the Insert Data activity. That could then be inserted in to other tables using subsequent Queries. This is especially useful for building Case Management systems.

0 0

Replies

replied on May 13, 2015

No, the Insert Date and Query Data activities are meant to be simple. The functionality is available by combining the 2 queries in a Custom Query activity.

0 0
replied on May 13, 2015 Show version history

True, but if you now have to write a Custom Query with 50 parameters in it, that's a lot less user friendly than being able to use the Insert Data wizard and check a box to get back an identity provider. Custom Query has its own issues that crop up with needing to syntax things properly (one of which I am working through on a Support ticket now).

Furthermore, I can't use the Query Data to get the identity provider necessarily, since there may not be any unique parameters available other than the unknown identity provider.

0 0
replied on May 13, 2015

I've added the request to our to-do list.

0 0
replied on March 14, 2017

Doing some researched and noticed this thread.

I have done it in one statement using the Statement below.

May help.

 

INSERT INTO "TABLE" values (?,?,?); 
SELECT * FROM "TABLE" WHERE "IDENTITYCOLUMN" = SCOPE_IDENTITY();
 

0 0
replied on March 14, 2017

Generating a token for the identifier of the inserted row is now a feature in the activity:

0 0
replied on March 29, 2021

Can the help files be updated to mention this feature?

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.