Field names in a text Destination file

  • Probably a stupid question but I just cannot find where to do it. What I am doing is using an OLE DB source which returns data from a stored procedure and sending this to a csv destination file. What I would like is to populate the first row in the destination file with the field names from the OLE DB query.

    Any help would be greatly appreciated.

  • Check the box "Column names in the first data row" in your flat file connection manager editor's General tab.

  • It sounds like you are trying to create the output file meta data (ie, the column names and data types) dynamically, is that correct?

    This isn't really how SSIS works - it needs the meta data configured as part of your connection object.

    Your best bet is to create a text file which is empty except for the field headings:

    Name,Address1,State,F1,F2,FN

    and then map your data to that.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • You're bang on. Thanks, I added the field names to a template file and it works perfect now. Thanks very much.

  • Great, thanks for posting back.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 5 posts - 1 through 4 (of 4 total)

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