February 20, 2007 at 7:48 am
I'm trying to validate the processing date in the database prior to loading data. I have 2 global variables Time_Id and Period_Ending_Date that i am attempting to set using execute sql tasks, setting the single rowset - 1 field to the global variable in the result set window of the task.
I have 2 sql tasks 1 each for each of the 2 fields. Then i have a execute script task where i try to read the variables and respond to a message box that the date is acceptable and continue processing.
The variables are predifined at the package level as strings and do not show up at all in the script as being defined.
I have used the script part in another package to get global variables from the package so i am fairly certian that part is ok.
the package executes, but when i look at the global variables the two user ones are not updated to the sql task results. I have executed the queries in the query analyzer and they work fine.
one is "select time_id from ctrl_time" and the other is "select period_ending_date from dim_time where time_id = (select time_id from ctrl_time)"
I have tried different variations on setting the gv's in the sql task but nothing seems to work.
Suggestions PLEASE?!?!?
February 23, 2007 at 7:58 am
hi,
I assume that you are setting the variables from theoutput of your sql task? You need to set the Reultname to the ordinal number of the result returned (0 would be column 1, 1 for column 2 etc).
Then you choose the correct user variable which you want to hold the returning value. You can then use this variable as a parameter to the next SQL task.
Apologies if I have not understood the question, but if this isn't the case, maybe you could explain a bit more fully?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply