Check SQL Value

More
2 years 11 months ago - 2 years 11 months 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: 2 years 11 months ago by hanisultan.

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

More
2 years 11 months ago - 1 year 8 hours 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 SQL To Variables 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)

www.etl-tools.com/wiki/advanced-etl-proc...to-variables-action/

Mike
ETL Architect
Last edit: 1 year 8 hours ago by admin.
The following user(s) said Thank You: hanisultan

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

More
2 years 11 months 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.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save