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.
| Author |
Topic |
|
ieee488
Starting Member
2 Posts |
Posted - 2010-12-14 : 21:31:16
|
| I have two tables --- Table1 has one column which is identity ID and one column with team names and Table2 has columns where one column is one team's ID# and another column with the second teams ID# and other columns with scores for each team for that week.I want to do a query to show that week's result but instead of the ID#, show the teams' names.What should the SQL statement look like? |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-12-14 : 22:15:41
|
| Looks like homework.Can you please show us what you have tried ? |
 |
|
|
ieee488
Starting Member
2 Posts |
Posted - 2010-12-15 : 20:14:41
|
| Actually it isn't a homework problem.But it turns out that I need to do two inner joins with Table1 but using two different alias and also subqueries. |
 |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-12-15 : 22:01:21
|
quote: Originally posted by ieee488 Actually it isn't a homework problem.But it turns out that I need to do two inner joins with Table1 but using two different alias and also subqueries.
A single inner join between the two tables is enough and you don't require any sub query.It will be better if you can post some sample data and expected output. |
 |
|
|
|
|
|