 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bill Todd Guest
|
Posted: Fri Nov 12, 2004 3:04 pm Post subject: Re: slq for orphans |
|
|
Try the following:
SELECT PK, FK
FROM DETAIL D LEFT OUTER JOIN MASTER M
ON D.FK = M.PK
WHERE M.PK IS NULL
--
Bill (TeamB)
TeamB cannot answer questions received via email
|
|
| Back to top |
|
 |
Terry Guest
|
Posted: Fri Nov 12, 2004 3:56 pm Post subject: slq for orphans |
|
|
I would like to create a sql select which selects the orphans in a detail
table.
as in
select * from detailtbl
where detailtbl.id not in mastertbl
mastertbl.id is a primarykey
detailtbl.id links many records to one record in mastertbl
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|