• kbleeker (10/18/2011)


    Hi Lowell - I made a change which appears to have sorted out the comma, but I'd like to know whether removing the space padding might have som drawback which I haven't foreseen:

    I've commented out the space padding between column names in the indexes section, since your LEFT() was only removing one character, AFTER adding the space -

    SELECT QUOTENAME(COLS.[name]) + ',' --+ ' '

    Thanks,

    Kevin

    Kevin you ROCK;

    that's it, i think it has to do with whether ANSI_PADDING is on or off.

    I was testing some more obscure things to try and recreate the scenario, and found an issue if your database was case Sensitive, the proc would not work, so i fixed that as well as adding the suggestion you identified...same links above, just updated.

    mea culpa on the error, should have seen that a long time ago.

    Thank you!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!