where the pivot result table is stored

  • i want to know the location of the result table generated by the pivot query

    so that i can use the same for my code in vb.net

  • It depends.

    Usually, if you just run it in Management Studio or within an view, it will only be displayed.

    If you want to use it afterwards you need to store it either in a permanent or temprary table.

    See SELECT ... INTO clause in BOL (Books Online, the help system installed together with SQL Server) for details.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • thank you verymuch,

    but my columns are dynamic. will the select ..into statement work for me. can you suggest any other dynamic table generation process.

  • If your columns are dynamic then PIVOT won't help you since it it's based on displaying predefined columns.

    You might want to look into DynamicCrossTabs (see the link in my signature).



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • select..into statement is working but i am unable to find the new stored table. can you help me in this.

  • select..into is displaying the result as 'affected 14 rows' but the result table is not being generated.

    any suggestion.

  • your select..into statement suggestion was wonderful. It started working for me.

    thanks once again.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply