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
 Transact-SQL (2000)
 comparing every record in a recordset

Author  Topic 

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2004-09-08 : 16:40:27
I have a problem, which I can explain but am struggling to translate into
SQL syntax.

myTable has 3 columns, with some example values
ID NAME NUMBER_ITEMS
1 john 4
2 tim 3
3 john 2
4 tim 1
5 roger 6
6 roger 7

Essentially, I am trying to derive every possible combination between NAME
and NUMBER_ITEMS , but as a set.
The set being "john,tim,roger".which conceptually become the columns
e,g
JOHN TIM ROGER
combination1 4 3 6
combination 2 4 1 6
combination3 4 3 7
combination4 4 1 7


Ultimately, I just need them as a coma delimited string. But , most
importantly I need to be able to get past STEP 1

Thanks
Jack

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-09-08 : 17:26:00
Please do not crosspost: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=39599

Corey
Go to Top of Page
   

- Advertisement -