• Jayded (4/15/2010)


    Thanks Wayne! In this instance when I'm making the lists do I have to have a consistency that SQL column 2 points to Excel column 3 such that if someone were to re-sort the Excel spreadsheet and move that column to column 4 that it would no longer work?

    Would there be a way to tie the two via the column ID in SQL?

    Ex. Column sCodeID in SQL is currently in Excel column 2 and row 1 is labled as sCodeID but should someone move that to column 8 it would still be ok as the system realizes that the column headed sCodeID belongs with SQL sCodeID regardless of where it is.

    If you are using a Header row in Excel, that becomes the column name. In this case, it will follow.

    If you don't have a Header row, the columns get names like F1...F255. In this case, you will need to know what column it has been changed to.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2