Hi,
I have a table called tblRegistration and another table called tblDownloadedRegistrations.
tblRegistration contains a list of ALL registrations and tblDownloadedRegistrations will contain all registrations that are downloaded.
Registrations are not moved from tblRegistration to tblDownloadedRegistrations but the unique key is used as a foreign key to reference each record.
When new registrations are added to tblRegistration and have not yet been downloaded I want to be able to display them in a list. How do I do this using SQL so that only the new registrations appear and not the downloaded ones? - I don't know the correct SQL syntaxt for this.
I hope this is clear. Thanks.
Displaying data from tables
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Displaying data from tables
if I understud your problem
try using query like
try using query like
Code: Select all
select * from tblRegistration where tblRegistration.id not in (select tblRegistration_id from tblDownloadedRegistrations)
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Displaying data from tables
ddragas, you understood my problem perfectly. Thank you so much - works like a charm 