I'm calling a stotred proc from another stored procedure. Called stored proc is as follows:CREATE PROCEDURE sp_GetIndexInfo ASBEGIN DECLARE @id int, @indid int SET @id = OBJECT_ID('authors') SELECT @indid = indid FROM sysindexes WHERE id = @id AND name = 'aunmind' DBCC SHOWCONTIG (@id, @indid)ENDThis stored proc gives the result as follows:DBCC SHOWCONTIG scanning 'authors' table...Table: 'authors' (117575457); index ID: 1, database ID: 5TABLE level scan performed.- Pages Scanned................................: 1- Extents Scanned..............................: 1- Extent Switches..............................: 0- Avg. Pages per Extent........................: 1.0- Scan Density [Best Count:Actual Count].......: 100.00% [1:1]- Logical Scan Fragmentation ..................: 0.00%- Extent Scan Fragmentation ...................: 0.00%- Avg. Bytes Free per Page.....................: 6008.0- Avg. Page Density (full).....................: 25.77%DBCC execution completed. If DBCC printed error messages, contact your system administrator.
I want to show this result in a crystal report, so I want to make another stored proc which will use this stored proc & return the result in one column of the resultset. (One solution can be to use osql DOS command & create the text file then somehow read the file and put it in one column. But it does not sounds like a sophisticated solution. I've to do it for all indexes in every table.)Please suggest me if you have any other idea.Thanks