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 |
|
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-02-10 : 08:15:44
|
| Hi,Table1id locationame1 A2 B3 CTable2id locationid1 12 33 24 1SELECT T2.ID,T1.FNAME FROM Table1 T1INNER JOIN Table2 T2ON T1.ID=T2.FNAMEID O/pid locationame1 A2 C3 B4 AThe above qry works ok..please do let me know the best way?????Thanks. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-10 : 08:22:32
|
| what do you mean by best way?------------------------------------------------------------------------------------------------------SQL Server MVP |
 |
|
|
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-02-10 : 08:53:17
|
quote: what do you mean by best way?
for many to 1 relation ship,i used INNER JOIN to get the required result.Ok. INNER JOIN is ok(The query which i have used above) for this kind of scnerio or please advice / suggest me your approach for this solution.. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-10 : 09:01:28
|
| I would have also prefered to use INNER JOIN in above scenario------------------------------------------------------------------------------------------------------SQL Server MVP |
 |
|
|
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-02-10 : 09:02:39
|
| Ok.Thanks Visakh16. |
 |
|
|
|
|
|