|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, October 17, 2012 5:22 AM
Points: 2,
Visits: 43
|
|
Hi Solomon, thanks for the reply but I didn't really want to execute the sproc in its entirety. Some of our report sprocs are complex and can take up to 40 seconds to complete. I was using the DBfit 'Inspect Query' command to execute the sproc with NULL variables as this instantly returns the 'result set' structure (the output column names) and not the actual 'result set' data.
These output column names are what I want to build my test around but I can't figure out a way of grabbing them within a test.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 11:12 AM
Points: 285,
Visits: 1,377
|
|
ian.gregson (2/14/2011) Hi Solomon, thanks for the reply but I didn't really want to execute the sproc in its entirety.
These output column names are what I want to build my test around but I can't figure out a way of grabbing them within a test.
Hi Ian. There is no way that I can think of to just grab the result set column names.
However, if you want to run the Proc with all parameters set to NULL, then just run it in an Execute while setting the variables to NULL, such as:
!|Execute| CREATE TABLE #ResultSetTest (ColA INT, ColB VARCHAR(50), ColC DATETIME) | !|Execute| INSERT INTO #ResultSetTest EXEC Test.dbo.TestProc NULL, NULL, NULL |
Or you can try setting the session property FMTONLY:
!|Execute| CREATE TABLE #ResultSetTest (ColA INT, ColB VARCHAR(50), ColC DATETIME) | !|Execute| SET FMTONLY ON | !|Execute| INSERT INTO #ResultSetTest EXEC Test.dbo.TestProc NULL, NULL, NULL | !|Execute| SET FMTONLY OFF |
SQL# - http://www.SQLsharp.com/
|
|
|
|