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 |
|
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2010-02-17 : 22:21:03
|
| I've table and row as follow,triptid | RID------------------------------------------_d091100007569 _r00000006_d091100007571 _r00000006_d091100007716 _r00000008/*tid is a unique*/coutRID | Cout | Posi--------------------------------_r00000006 KL 1_r00000006 JB 2_r00000008 SG 1_r00000008 BI 2_r00000008 KL 3_r00000010 JB 1 How to query, so my resultset as follow,tid | RID | Cout | Posi-----------------------------------------------------------_d091100007569 _r00000006 KL 1 _d091100007569 _r00000006 JB 2 _d091100007571 _r00000006 KL 1_d091100007571 _r00000006 JB 2 _d091100007716 _r00000008 SG 1_d091100007716 _r00000008 BI 2_d091100007716 _r00000008 KL 3 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-02-17 : 22:28:52
|
| select t1.tid,t1.rid,c1.cout,c1.posi from trip t1left join cout c1 on c1.rid=t1.ridPBUH |
 |
|
|
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2010-02-17 : 23:47:40
|
| tq sir |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-18 : 00:57:03
|
quote: Originally posted by Idera select t1.tid,t1.rid,c1.cout,c1.posi from trip t1left join cout c1 on c1.rid=t1.ridPBUH
why left join? isnt inner join enough as per sample data?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|