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)
 summary query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-01-19 : 10:53:12
Aaron writes "I have a table which contains a sports schedule:
team1_id,team2_id,result1,result2

result1 is for team1_id
result2 is for team2_id

I want to run a query to get summarize the two id fields with their assoiciated results:
For Example the dataset might look like this:
row 1 - id1=20,id2=30,result1=1,result2=3
row 2 - id1=30,id2=20,result1=2,result2=2
row 3 - id1=20,id2=40,result1=3,result2=1
row 4 - id1=40,id2=20,result1=1,result2=3

how do I build the query to merge the ids and thier respective results into one countable dataset"

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-19 : 12:28:53
Already answered here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=77774


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -