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] "Ha Vo" <ha.vo@prometheuslabs.com> wrote in message
news:Ojy6kLrbEHA.384@TK2MSFTNGP10.phx.gbl...
> 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...
> > Try re-writing your stored procedure to use table variables only and not
> use temp tables or create table statements.
> >
> > "Ha Vo" wrote:
> >
> > > 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
> > >
> > >
> > >
>
>