First Record Set

  • Let's say you have a stored proc or DBCC statement that spits out more than one record set. I can't remember how you only retrieve the results from whichever record set you want.

    For example, DBCC Show_Statistics pumps out three record sets. How do I get just the first one?

    Thx in advance...

  • Whisper9999 (2/22/2012)


    Let's say you have a stored proc or DBCC statement that spits out more than one record set. I can't remember how you only retrieve the results from whichever record set you want.

    For example, DBCC Show_Statistics pumps out three record sets. How do I get just the first one?

    Thx in advance...

    You can get each of the three sections independently by adding an option to the DBCC command:

    DBCC SHOW_STATISTICS ('table name',

    'Index_name') WITH STAT_HEADER;

    DBCC SHOW_STATISTICS ('table name',

    'Index_name') WITH DENSITY_VECTOR;

    DBCC SHOW_STATISTICS ('table name',

    'Index_name') WITH HISTOGRAM;

    Regards,

    Skybvi

    Regards
    Sushant Kumar
    MCTS,MCP

  • Oh that is beautiful! Thanks a million...

Viewing 3 posts - 1 through 2 (of 2 total)

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