Groups | Blog | Home
all groups > sql server reporting services > july 2004 >

sql server reporting services : Using temp tables in RS


Ha Vo
7/20/2004 2:15:46 PM
Hello,

I am using a stored procedure that's using table variables and a temp table
for querying purposes. I want to create a report in Reporting Services using
this stored procedure as a datasource but it will not allow temp tables. I
am currently using SQL2000. Please help.

Thanks,
Allison

Ravi Mumulla (Microsoft)
7/20/2004 2:29:09 PM
What error are you getting?

--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services

This posting is provided "AS IS" with no warranties, and confers no rights.
[quoted text, click to view]

B. Mark McKinney
7/20/2004 3:51:02 PM
Try re-writing your stored procedure to use table variables only and not use temp tables or create table statements.

[quoted text, click to view]
Ha Vo
7/20/2004 4:40:04 PM
I am using table variables with all the tables in my query except one table
( person table). This person table is a huge table...hence when I use all
table variables, the query takes 9 minutes plus to return data. Please help.
Thanks.

Allison.


"B. Mark McKinney" <BMarkMcKinney@discussions.microsoft.com> wrote in
message news:17D7CE0D-2BD1-45E8-B80E-8AC7A696E9A9@microsoft.com...
[quoted text, click to view]

Bruce Loehle-Conger
7/20/2004 10:09:23 PM
I use temp tables all the time. You can only have one result set returned
from a stored procedure. The last statement do a select * from #temp (or
whatever your temp table is called) and it will work. When you use the
stored procedure you will need to be able to execute it to get the field
list (and use the refresh fields button to see the list of fields).

Bruce L-C

[quoted text, click to view]

Augusta
7/21/2004 8:52:01 PM

Bruce or Allison:
The method that Bruced described on how to use the Temp table is exactly what I am currently using. And Yes, it works very well BUT I would like to learn how to use table variables. Do you have a sample code or a URL to the table variables?

Please and Thank You!
Augusta


[quoted text, click to view]
hovercraft2x
10/8/2004 1:13:02 PM
i found i have the same problem with temp tables in stored procs. if you hit
the refresh button and then the ! button the stored proc will work eventhough
you get an error when you initially setup the dataset.

[quoted text, click to view]
AddThis Social Bookmark Button