Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
yoggi123
Starting Member
29 Posts |
Posted - 2005-01-17 : 09:40:26
|
| Hey,I am using the following stored procedure, but as it is now it returns 2 datasets. I need it to return only 1.ALTER PROCEDURE dbo.Test2(@Location varchar(250),@FromDate datetime,@ToDate datetime)AS SET NOCOUNT ON CREATE TABLE #Temp1 (themonth varchar(12), theyear varchar(12), averagedaystofilltotal float, averagefillratetotal float,delaytimetotal float, responsetimelagtotal float)INSERT INTO #Temp1(themonth, theyear, averagedaystofilltotal, averagefillratetotal, delaytimetotal, responsetimelagtotal)EXEC rptStatsGraphicalYEARoverYear @Location, @FromDate, @ToDateCreate table #Temp2(averagedaystofilltarget float, averagefillratetarget float, responsetimelagtarget float)INSERT INTO #Temp2(averagedaystofilltarget, averagefillratetarget, responsetimelagtarget)EXEC Test1SELECT * FROM #Temp1Select * from #Temp2drop table #Temp1drop table #Temp2Would anyone have any suggestions on how to modify this procedure so that it returns only one dataset, but yet still keeps the data seperated? Or is this even possible?Thanks |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-17 : 09:46:08
|
this will return 2 dataTables in one dataset in ado.netor 2 recorsets in ADO 3.0.if you really want it to be one i guess you could do something likeselect * from #temp1union allselect dummyvalues union allselect * from #temp2but this would require the same number of columns in all selects... although i don't know why would you want to do ot like that Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|
|
|