Click here to Skip to main content
15,913,722 members
Home / Discussions / Database
   

Database

 
Questioncommunicating SQL server with DB2 Pin
ajit zamindar7-Mar-07 18:34
ajit zamindar7-Mar-07 18:34 
QuestionDatabase contention Pin
Darkness847-Mar-07 11:56
Darkness847-Mar-07 11:56 
AnswerRe: Database contention Pin
Dave Kreskowiak7-Mar-07 12:30
mveDave Kreskowiak7-Mar-07 12:30 
GeneralRe: Database contention Pin
Darkness847-Mar-07 12:38
Darkness847-Mar-07 12:38 
GeneralRe: Database contention Pin
Dave Kreskowiak7-Mar-07 12:46
mveDave Kreskowiak7-Mar-07 12:46 
QuestionHeterogeneous queries Pin
alexrad7-Mar-07 11:03
alexrad7-Mar-07 11:03 
AnswerRe: Heterogeneous queries Pin
alexrad7-Mar-07 11:18
alexrad7-Mar-07 11:18 
QuestionReturning a DataSet from a Stored Procedure within a S.P. Pin
dwatkins@dirq.net7-Mar-07 9:44
dwatkins@dirq.net7-Mar-07 9:44 
I've been trying to consolidate/reuse some business logic in a recent project and doing so would require me (within a MS-SQL 2000 stored procedure) to get a dataset from a stored procedure and aggregate some data. Is there a way to get a dataset from a stored procedure and put it in a temporary table? This is not an output variable, just the regular output dataset. I'm using Microsoft SQL 2000.

Help please!

USE PD9

DECLARE @RC int
DECLARE @datebegin varchar(10)
DECLARE @dateend varchar(10)

SET @datebegin = '01/01/2007'
SET @dateend = '01/15/2007'

--this is a dataset of our sales reps
DECLARE sales_cursor CURSOR
FOR
   	SELECT DISTINCT
		[ABAN8]
	FROM 
		[vF0101_RepDetails]
	ORDER BY [ABAN8]

OPEN sales_cursor

DECLARE @an8 int

FETCH NEXT FROM sales_cursor INTO @an8

WHILE (@@FETCH_STATUS <> -1)
BEGIN
   IF (@@FETCH_STATUS <> -2)
   BEGIN  
	-- i'm looping through a dataset of our sales reps
        -- now i need to get a dataset from the below sproc
        -- loop through that dataset and put it in a temp table
        -- the problem is getting the dataset from the next line - HOW??
	-- EXEC @RC = [PD9].[dbo].[usp_rs_getSalesShipments] @an8, @datebegin, @dateend
	-- print @RC
   END
   FETCH NEXT FROM sales_cursor INTO @an8
END
CLOSE sales_cursor
DEALLOCATE sales_cursor



AnswerRe: Returning a Resultset from a Stored Procedure within a S.P. Pin
andyharman7-Mar-07 22:36
professionalandyharman7-Mar-07 22:36 
Questionhow split function work in sql [modified] Pin
findtango7-Mar-07 5:06
findtango7-Mar-07 5:06 
AnswerRe: how split function work in sql Pin
Mark J. Miller7-Mar-07 5:29
Mark J. Miller7-Mar-07 5:29 
QuestionHow to insert data from Dataset to Data tables in SQL Pin
Nagaraj.k7-Mar-07 2:35
Nagaraj.k7-Mar-07 2:35 
AnswerRe: How to insert data from Dataset to Data tables in SQL Pin
Marek Grzenkowicz7-Mar-07 4:11
Marek Grzenkowicz7-Mar-07 4:11 
QuestionRe: How to insert data from Dataset to Data tables in SQL Pin
Nagaraj.k7-Mar-07 20:23
Nagaraj.k7-Mar-07 20:23 
AnswerRe: How to insert data from Dataset to Data tables in SQL Pin
Marek Grzenkowicz7-Mar-07 21:26
Marek Grzenkowicz7-Mar-07 21:26 
AnswerRe: How to insert data from Dataset to Data tables in SQL Pin
praveen_gattu20007-Mar-07 21:28
praveen_gattu20007-Mar-07 21:28 
QuestionHow to get primarykey and foreign key info of a given table Pin
NK77-Mar-07 0:55
NK77-Mar-07 0:55 
AnswerRe: How to get primarykey and foreign key info of a given table Pin
kubben7-Mar-07 2:32
kubben7-Mar-07 2:32 
GeneralRe: How to get primarykey and foreign key info of a given table Pin
NK77-Mar-07 18:14
NK77-Mar-07 18:14 
GeneralRe: How to get primarykey and foreign key info of a given table Pin
kubben8-Mar-07 2:48
kubben8-Mar-07 2:48 
GeneralRe: How to get primarykey and foreign key info of a given table Pin
NK712-Mar-07 2:07
NK712-Mar-07 2:07 
QuestionQuerry to get all the tables in Access Database Pin
blackjack21506-Mar-07 22:55
blackjack21506-Mar-07 22:55 
AnswerRe: Querry to get all the tables in Access Database Pin
Mark J. Miller7-Mar-07 5:34
Mark J. Miller7-Mar-07 5:34 
QuestionValidating a textbox field Pin
Member 37415626-Mar-07 22:20
Member 37415626-Mar-07 22:20 
AnswerRe: Validating a textbox field Pin
Colin Angus Mackay6-Mar-07 22:32
Colin Angus Mackay6-Mar-07 22:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.