locked
filename to table RRS feed

  • Question

  • Hi

    I load datas from excel to a table, but I need load the filename to a column too. How can I?

    This full load is in a Foreach Loop Container, where I give value for @[User::Filename] with Foreach file enumerator

    I have an Excel Source with Excel connection manager, where the Expressions:ExcelFilePath value is a variable:

    @[User::Filename]

    The Excel read these files and load datas, so the variable is working, but when the second task Derivable Column add the @[User::Filename] to flow, the value is null

    Monday, November 7, 2016 11:50 AM

Answers

  • Hi Shade33,

    Does the Derived Column outside the for each loop ? if so,the last 'FileName' should be empty .


    Regards, David .

    • Marked as answer by Shade33 Monday, November 7, 2016 4:20 PM
    Monday, November 7, 2016 12:00 PM

All replies

  • Hi Shade33,

    Does the Derived Column outside the for each loop ? if so,the last 'FileName' should be empty .


    Regards, David .

    • Marked as answer by Shade33 Monday, November 7, 2016 4:20 PM
    Monday, November 7, 2016 12:00 PM
  • The Data Flow Task is in the Foreach Loop Container. And 3 Tasks are in the Data Flow Task:

    Excel Source, Derviced Column, OLE DB Destination

    Monday, November 7, 2016 12:30 PM
  • Heureka

    The variable begin value was void and when I make the a Derived Column Task became 0 length automatic.

    So I add a big begin value at the variables window, setup the Derived Column, then I delete the begin value

    It's working

    Monday, November 7, 2016 2:39 PM
  • Or I can setup the Derived Column's column length with advanced editor.

    Sorry I'm new yet

    Monday, November 7, 2016 2:43 PM