SQL Server Performance Forum – Threads Archive
Problem with ActiveX Script IF…END IF
I have a relatively simple transformation task that needs to compare an incoming value to a global variable value, but can’t seem to get the syntax right. Here it is: Function Main() if DTSSource("Date Applied") >= DTSGlobalVariables("DateClosed").value thenDTSDestination("field_name) = DTSSource("field_name")
Main = DTSTransformStat_OK
else
Main = DTSTransformStat_SkipInsert
end if End Function
When I try to test the task I get the following error: "Invalid procedure call or arguement: ‘DTSSource’"
What am I doing wrong here? I need a similar test in several tasks. TIA – Cyberwombat <font color="red"><h6>The Romans did not create a great empire by having meetings…they did it by killing all who opposed them.</h6></font id="red">
What is the datatype used for ‘Date Applied’ and I guess because of space in that variable you are getting issue. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
Originally posted by satya
What is the datatype used for ‘Date Applied’ and I guess because of space in that variable you are getting issue.
‘Date Applied’ is a smalldatetime field name from the incoming table.
The Romans did not create a great empire by having meetings…they did it by killing all who opposed them.
Have you tried without using ‘whitespace’ in that variable? Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
]]>