Syntax Error on a DTS Package script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lesliec
    New Member
    • Sep 2007
    • 1

    Syntax Error on a DTS Package script

    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
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    As you have posted a question in the articles section it is being moved to SQL Server Forum.

    MODERATOR.

    Comment

    Working...