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

Question

Question

Does Rows to Return Selection in Custom Query Activity Alter Select Statement?

asked on December 29, 2022

When configuring the Custom Query activity in Workflow, does the option you choose for the 'Rows to Return' section alter the Select statement? For example, if my custom query is:

SELECT column1, column2, column3
FROM laserfiche
WHERE column1 = '123'

If I select 'First row only', does it alter the query to:

SELECT TOP (1) column1, column2, column3
FROM laserfiche
WHERE column1 = '123'

or is it returning all rows and then Workflow is filtering out the results?

0 0

Answer

SELECTED ANSWER
replied on December 29, 2022

The query is not altered. It gets run as specified in the "Custom Query" activity and then Workflow itself will filter the results and return the first row.

1 0
replied on December 29, 2022

Thank you for that information Alex. So if we were looking to make the query more efficient we should use TOP in the query instead of using the 'Rows to Return' setting for the example I gave. 

1 0
replied on December 29, 2022

Yes, that's correct.

1 0
replied on December 29, 2022

Out of curiosity does it work the same way for the Query Data activity? 

0 0
replied on December 29, 2022

Yes

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.