Replace text in a variable value?
Hi, i have a variable vLoop that loops through a results set Now, i want to replace text contained in vLoop before submitting it to the Execute SQL Task (SqlSource: this variable vLoop) How can i do that? I don't know how to use EvaluateExpression for this variable for this particular scenario The vLoop changes value for every loop iteration, and i have to replace some text in it everytime before SQL Task executes it Thanks, -srinivas yelamanchili
November 3rd, 2010 5:41pm

Could you load the changed text into a second variable and use that in the ExecuteSQL task?Russel Loski, MCT
Free Windows Admin Tool Kit Click here and download it now
November 3rd, 2010 6:45pm

Can you put a Script Task inside the loop, and specify the vLoop variable in the ReadWrite list. Then write code to manipulate its value. Is it's new value somehow dependant on its original value? One line of Script will do this: Dts.Variables("vLoop").Value = Cint(Dts.Variables("vLoop").Value) + 1 Are we missing something?Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
November 3rd, 2010 10:50pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics