yechan
asked on
Question about DTS syntax
Hi,
I am looking at an ActiveX script and I keep running into lines of code something like the following:
DTSDestination("comments") = DTSDestination("comments") + " Some additional comments here."
How can this syntax be legal? I mean, how does the server know what DTSDestination("comments") is prior to assigning it back to DTSDestination("comments") ?
I suppose it must be ok since it has run like this for a while. How can I convert this type of logic inside SSIS script component.
thanks
I am looking at an ActiveX script and I keep running into lines of code something like the following:
DTSDestination("comments")
How can this syntax be legal? I mean, how does the server know what DTSDestination("comments")
I suppose it must be ok since it has run like this for a while. How can I convert this type of logic inside SSIS script component.
thanks
Ohh check that, there's an example in the middle of the page for column "AccountMonth"
http://msdn.microsoft.com/en-us/library/aa933459%28v=sql.80%29.aspx
http://msdn.microsoft.com/en-us/library/aa933459%28v=sql.80%29.aspx
ASKER
the value of "DTSDestination("comments" ) " is from the destination table? Assuming the destination table has records, how would it know which comment to pick?
thanks
thanks
"comments" is the column name and it's row by row level.
ASKER
what I mean is how would the computer know which row to pick?
it's processing each and every row, iterating over rows. reading row by row and adding that text to it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Actually I do see your point and taken out of context while legal does not make a lot of sense. What I suspect you have is something like this:
DTSDestination("comments") = DTSSource("SomeColumn")
or even:
DTSDestination("comments") = "SomeValue"
...
And then:
DTSDestination("comments") = DTSDestination("comments") + " Some additional comments here."
Or perhaps it is in a For loop as in:
For I = 1 to 10
DTSDestination("comments") = DTSDestination("comments") + " Some additional comments here."
Next
DTSDestination("comments")
or even:
DTSDestination("comments")
...
And then:
DTSDestination("comments")
Or perhaps it is in a For loop as in:
For I = 1 to 10
DTSDestination("comments")
Next
ASKER
sorry for the drop off. After working with DTS a little bit more, the answers really make much more sense.
You are welcome.
example if the value in the comments table is "YECHAN"
so comments = comments + " Question #12324"
that will give you "YECHAN Question #12324"