• Man, There is a so much more easier way to do this, here is what I do...

    1. In Query Analyser, ensure that your results target is to text and the output format is Comma Delimited (CSV) also ensure that Print Column headers(*) is ticked - This is set under the Tools|Options|Results Tab.

    2. Execute your SELECT statement

    3. In the Results Window highlight the entire output (Ctrl+A) the copy (Ctrl+C)

    4. Open Excel

    5. Highlight Column A Grid Slot 1 in Excel and paste (Ctrl+V) you will note that all of the data will reside in column A

    6. Highlight The whole of Column A (Click the A bar at the top of the column)

    7. Then goto the data drop down Menu then select "Text to Columns" (Alt+D+E)

    8. In the Convert Text to columns wizard, select the "delimited" option them click next

    9. Then Place a tick in the "Comma" box and untick the rest, then go next

    10. The next window would be to change the data format, a good tip here is if you SELECT has a DateTime column, ensure that you highlight that column at this point and set the data type to text

    11. Then Go FINISH

     

    and you are done...