SSIS add column from variable to flat file source

Posted on 2009-02-23
Last Modified: 2013-11-10
I am importing multiple flat files in SSIS and inserting the data into a table then I update a column in the table with the file name that I imported the data from.  This works fine but I think the update is making it take a LOT longer then needed.

I want to be able to set the value of a field in the destination source to a value from variable (the file name) at the same time I insert the data from the flat file source so I do not need to do the update after the fact.  I think this would save a lot of processing time.

I must not be searching Google for the proper terms to find a way to do this as I am sure something similar is being done all over the place I just can not find a way to do it.

If you need more details let me know.
Question by:brad2575
    LVL 14

    Accepted Solution

    on your data flow add a derived column.

    you can add variables to a column then add it to the insert portion.

    LVL 16

    Author Closing Comment

    That worked perfectly thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now