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 |
|
ArpitNarula
Starting Member
16 Posts |
Posted - 2011-02-09 : 08:26:04
|
| Hi GuysThere are two tables A and B.Table A id name 1 a 2 b 3 c 4 d Table B loc aid aid 2qw 1 3we 1 1rt 2 2ty 3 2 And I need a query to produce output like loc aid aid 2qw a cwe a art b bty c bThanks in Advance |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-02-09 : 08:29:41
|
| select t1.loc,t2.name,t3.name from tableB as t1 inner join tableA as t2 on t1.aid=t2.id inner join tableA as t3 on t1.aid2=t3.idMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|