OK, I'm stumped...

Ken Ray kray at sonsothunder.com
Mon Jul 7 14:52:50 CDT 2003


I have a series of people (records in the Entities table) and a number
of Users (records in the Users table). Each user has the ability to mark
a record, and since the same record could be marked by more than one
user, I have a Marked table that contains an ObjectPtr to the Users
table and an ObjectPtr to the Entities table. Something like this
(simplified for clarity):

Entities
--------
FirstName
LastName
CompanyName

Users
-----
UserName


Marked
------
EntityLink
UserLink

Now what I want to do is display a list that contains all the records in
the Entities table, along with whether they are marked or not (marked
records get a checkmark in the column; unmarked records don't). I can
get a list of marked records for the current user by checking whether
the Marked table contains any records connected to the current user (for
argument's sake, let's call the RecID in the User table for the current
user "1"):

SELECT Entities.FirstName,Entities.LastName,
Entitites.Company FROM Entities,Marked 
WHERE Marked.UserLink=1

But how do I get the *unmarked* Entities? I can't do this:

SELECT Marked.UserLink,Entities.FirstName,
Entities.LastName,Entities.Company
FROM Entities,Marked

... because I only get the records that have been marked by ANY user,
and I don't get back the records that were not marked at all.

Any ideas?

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 





More information about the Valentina mailing list