• Wow that table needs some help. If at all possible you should consider changing that table. You should be storing datetime data in datetime instead of breaking apart all the pieces across various nvarchar columns. Then there is the normalization. Of course from some of the description this may be a holding table for importing from an external file prior to being imported and massaged into usable data. If that is the case then disregard my rant.

    I appreciate the table ddl. But the insert is useless. It looks like it from right clicking the table in SSMS and creating the insert script. I have never really understood the point of that "feature" because it creates completely useless information.

    The best way to post this is to just create an insert statement.

    insert table

    select col1, col2, col3 union all

    select col1, col2, col3...

    Also if you use the IFCode shortcuts (on the left side when posting) you can wrap your code in the code tags and it will make it a lot cleaner. (like my code above)

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/