Entering filename into database column

  • I am doing an import from excel into a SQL server table through a datapump task. How can I get the filename of the excel, which is the same as the uploading company, strip the .xls extension and insert it in a column (company, nvarchar(50), not_null) in the target table.


    ------------------------------------------

    Did you know that if you don't drink your milk every morning, the Arla-rabbit will come and shoot you in the head, or sometimes in the belly?

  • Personally I pull the filename into a global variable and assign the variable as a part of the data pump using activex

     

    Function Main()

     DTSDestination("FileName") = DTSGlobalVariables("gv_TableName").Value

     Main = DTSTransformStat_OK

    End Function



    Shamless self promotion - read my blog http://sirsql.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply