Redirect flatfile import record with extra columns

  • Hi there,

    When doing a Flatfile import within a For Each Loop (set for each file within a folder) to a ##tempTable, is there a way for me to redirect rows with an improper amount of columns?

    For example, I have a flatfile that has the following records, how would I redirect the erroneous record to an error log?

    Bob 234 10:30 <-- good record
    10:30 Robert Smith 23 <-- too many columns My ##tempTable is setup to accept 3 columns each with datatype of NVARCHAR(10) but my second row has 4 columns based on a space as the delimiter. Any ideas would be much appreciated.

  • I've finally found the solution.

    I found a thread talking about a similar problem: Here

    And here was the solution I followed which works like a charm, I'm a big fan of this blog:

    Here

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

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