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)
 Returning data from a stored recordset.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-10-12 : 07:47:36
Erico writes "Hi,
i'm working with a recordset to return data. My problem is that the data i return is built dynamically. I'm working with the results of some surveys, and the amount of columns depends on the results of the surveys. I know i'm supposed to use a temp table, but after dealing with T-SQL to return my columns dynamically, i'm wondering if there's a way to get the results without having to build the temp table dynamically as well. Thanks for your reply."

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-10-12 : 07:59:30
Returning dynamically shaped resultset is not good idea...but its really hard to get the idea of your problem. Can you please post your SP and table structure here?

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-12 : 08:00:07
select * into #sometable from somequery.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-13 : 10:21:05
quote:
Originally posted by Peso

select * into #sometable from somequery.


Peter Larsson
Helsingborg, Sweden


More specifically

select * into #sometable from
(
somequery
) T



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -