columns operation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pchaitanya
    New Member
    • Feb 2008
    • 13

    columns operation

    Hi all,
    Is there any way so that I can get data in a column as column headers for that table
  • gpl
    New Member
    • Jul 2007
    • 152

    #2
    It sounds like you are wanting to create a crosstab query (where for each value in a column you return a count) - if thats right, put crosstab into the search box at the top and you will find many posts about it.

    If that isnt what you want, just say a little clearer what it is you want to do

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      Or search PIVOT or UNPIVOT

      -- CK

      Comment

      • pchaitanya
        New Member
        • Feb 2008
        • 13

        #4
        Thank u,
        In case of using pivot we should initially declare the required item or column .
        How can we read column dynamically at run time

        Comment

        • ck9663
          Recognized Expert Specialist
          • Jun 2007
          • 2878

          #5
          You might be able to get away by building your T-SQL dynamically.

          -- CK

          Comment

          Working...