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)
 Special Stored Procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-22 : 07:47:27
Paul writes "I've got a problem and so far I haven't seen a solution that matches what I'm doing. If the answer is already there theny I'm just missinge it or not sure if I'm looking at the right subjects.

I need a stored procedure that does the following:
takes a query that returns:

uniqueID|question|answer
-------------------------
id1|question1|answer1
...
idN|questionN|answerN

and turns it into

uniquid|question1|...|questionN
--------------------------------
id1|answer1|...|answerN
...
idN|answer1|...|answerN

Heres the quirks, the number of different types of questions is over 180.

The end of it all I need to be able to simple run a query off of the results of that stored procedure.
any ideas?"

dev45
Yak Posting Veteran

54 Posts

Posted - 2005-03-22 : 08:24:11
so... u say that u need to populate the same data (answer1.... answerN) for each id ?? am i missing something here?
do u mean that for id_i of question_i u need to have the answers corresponding to that question?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-22 : 08:31:04
you'll need
either this:
http://weblogs.sqlteam.com/mladenp/archive/2005/03/15/4260.aspx
or this:
http://www.sqlteam.com/item.asp?ItemID=2955

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -