• Sterling Ostin (10/24/2016)


    Jeff - Look at the fourth and sixth small paragraph of my original post. I did exactly what you are suggesting I did not do. I asked to get sp_column-style output.

    Many replies on SSC ask what any given poster is "doing" - instead of focusing on what a poster wants to do. I need to get work done, not explain what our business does. And yes, this can be very frustrating - for that I apologize.

    I know you are a SQL expert and I have seen your posts for years, however it might be good to remember that for many of us asking questions, SQL is a small part of what we do - as is the case in my work. I apologize for looking for quick help, but I thought that was at least part of the idea behind the SSC forums.

    Understood. Please realize that we sometimes want to help the poster fix the root problem rather than put the proverbial Band-Aid on a stab wound.

    The real key here is that you really needed to be able to get output similar to what sp_Columns provided. You found one way and shared that and that's a part of what makes this site great. Another part of what makes it great are the discussions as to why someone is trying to do something so that we can help them avoid doing things "the hard way". There have been many times where the OP has come back and said something like "Holy Moly! I had no clue!".

    BTW, did you have a look at the two alternate solutions to your original problem that I posted? Might come in hand for future things with having the need to build a table first.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)