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 |
|
dmaxj
Posting Yak Master
174 Posts |
Posted - 2011-01-21 : 12:14:05
|
| I have a table A with a primary key. I have a related table B with multiple foreign keys from table A. Code follows:SELECT pk_ID, fk_ID field1, field2FROM table A INNER JOIN table B ONA.pk_ID = B.fk_IDThis returns all matches in B where A exist.Is there a way to only return the latter of the 2 or more records that exist in table B instead of all of the matches in table B ?Regards |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-24 : 11:31:17
|
| not quite clear what you're looking atcan you post data sample and explain what you want?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|