Check SQL Value

More
1 month 2 weeks ago - 1 month 2 weeks ago #22804 by hanisultan
Check SQL Value was created by hanisultan
<Check SQL Value> is available in the SQL data check object but not in the SQL script object.  I have a package that is running few SQL script objects and I need to capture the results of each, some of them are updating, other returning counts, etc.  Right now, I'm using the SQL Data check object for all of these scripts, and in some cases I just return the @@rowcount - see example - is this the best way or is there another way where I can capture the results from sql scripts?
Last edit: 1 month 2 weeks ago by hanisultan.

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #22806 by admin
Replied by admin on topic Check SQL Value
The way I would do it I would insert the result into a separate table.
Then I would use the Set variable package action to get all values

CREATE TABLE EXECUTION_RESULTS
(
VARIABLE_NAME VARCHAR (100),
VARIABLE_VALUE VARCHAR (100)
)

insert into EXECUTION_RESULTS values ('<InserCount>', 1200)

wiki.etl-tools.com/docs/advanced-etl-pro...set-variable-action/

Mike
ETL Architect
The following user(s) said Thank You: hanisultan

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #22809 by hanisultan
Replied by hanisultan on topic Check SQL Value
I think that is what I will be doing and since I don't always need to check the value but just capture it, I can just have an insert statement inside the script into a table - Thanks Mike

Please Log in or Create an account to join the conversation.