![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I had written an earlier question about how to do a "where" clause inside an Execute SQL Task properties. I thought that I might be able to create a global variable in script that'd have the where part of it in there, and would fill in the part of the where clause that I was wanting to use. I had in mind passing a second parameter into the Execute SQL Task properties where the clause: "where DTSGlobalvariables("OccursCount").value = 0" which in activex script would already be evaluated when it came to the SQL that would be inserting the record. I can't figure out how to add a second parameter to it though. Another question, regarding branching in it (another plan) was in the example in http://www.sqldts.com/default.aspx?218 But what I can't figure out is how A resolves to whatever step in the job the step preceding it resolved it to be A. In the example, where does the name: DTSStep_DTSActiveScriptTask_1 come from? I'm not following how that dts name above resolves to A in the example. I see what it's doing, but not sure if I understand how it knows where to go, based on the names within SetupPath and A,B,C and X,Y,Z. BC |
#3
| |||
| |||
|
|
You idea about the WHERE and GVs will never AFAIK know work which is why I suggested using workflow Right click on a task Workflow | Workflow Proerties | options Allan: |
#4
| |||
| |||
|
|
Allan Mitchell wrote: You idea about the WHERE and GVs will never AFAIK know work which is why I suggested using workflow Right click on a task Workflow | Workflow Proerties | options Allan: Thanks for the help. The workflow wasn't as intimidating as first glance. Once I quit looking for the easy way out I finally got it. I have one other question though - my global variables won't change, even though the new filename should be something else. I guess when I was testing, I had in my code (which I've since removed) to rename a file as my test file to test other parts of the job. How do you make the global variables refresh each time the job is run? It should be picking up a new text input file 20050711.CUB on it now, but it keeps telling me it's the old one 20050707.CUB. Thanks BC |
#5
| |||
| |||
|
|
There is a difference between design and runtime. The package saved value will not change between executions if you open it back up. If you change the GV val in a run then it is changed for that run and that runonly |
#6
| |||
| |||
|
|
Allan Mitchell wrote: There is a difference between design and runtime. The package saved value will not change between executions if you open it back up. If you change the GV val in a run then it is changed for that run and that runonly If I understand correctly, if I go ahead & schedule this dts job and stick it in the batch process, it'll run with the correct date and everything; but if I open it up in design mode, it'll revert back to the info I had in the global variables when I developed it. Is this correct? Thanks again for the assistance. BC |
![]() |
| Thread Tools | |
| Display Modes | |
| |