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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Temporary tables and MSDE

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-13 : 08:20:58
Carl writes "Firstly, I'm using MSDE -- which may be the problem.

I have two related stored procedures -- a parent and a child.
The child has a union query that generates details that I need
to summarize in the "parent" procedure. So in the parent, I
create a #mytemp table by using INSERT when I call the child
procedure. The problem is that the parent procedure query
"runs successfully" according to MS Access's stored
Procedure interface but no result set displays.

CODE from "Parent" procedure:
----------------------------
CREATE TABLE #mytemp
(
MyId int,
AddMeUp int,
StrName varchar(50)
)

/* insert union query results into temp table */
/* it results in the 3 columns defined in CREATE TABLE */
INSERT #mytemp
EXEC spGetUnionData


/* this is the result set I want to generate */
SELECT Sum(AddMeUp) as "Num", Max(StrName) as "String"
FROM #mytemp GROUP By #mytemp.MyId

RETURN
----------------------------

If I run the "EXEC" by itself -- that is, remove the
"INSERT" and "SELECT" -- it displays the result set. But when I
run it as shown, no result set.

Is it me? Or, is it MSDE?"
   

- Advertisement -