• Jeff Moden (9/23/2012)


    GilaMonster (9/22/2012)


    You *can* use dynamic SQL. Whether it's a good idea to do so is another matter...

    Do you have an alternative?

    Yes.

    I'm waiting for the OP to clarify exactly what he wants to see, as Livingstone asked.

    Do you have a solution?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass