I created a DTS package. I am trying to use the DTS package to remove leading zeros from one of the fields (Number). Below is the script that I have so far. I get a syntax error when I run the pacakage.
Function Main()
DTSDestination( "Action") = "NEW"
if DTSSource("Owne rAccountID") like '0%' then DTSDestination( "Number") = substring (Number,2,len (Number)) else DTSDestination( "Number") = DTSSource("Owne rAccountID") end if
Main = DTSTransformSta t_OK
End Function
SQL Server 2000
Function Main()
DTSDestination( "Action") = "NEW"
if DTSSource("Owne rAccountID") like '0%' then DTSDestination( "Number") = substring (Number,2,len (Number)) else DTSDestination( "Number") = DTSSource("Owne rAccountID") end if
Main = DTSTransformSta t_OK
End Function
SQL Server 2000
Comment