Table help

  • Thread starter Thread starter Bob Parr
  • Start date Start date
B

Bob Parr

I have a query that I have created to pull data from 3 tables that I cannot
edit. That is I don't own the tables so I cannot modify them. What I am
looking for is a way to keep track of the records tha I have printed, so I
don't print them again. The only way I can think to do this is have another
table that keeps track of the records I have printed. Is there an easier
way to do this, and what would be the easiest way to check the records from
one table against the other.

Bob
 
Bob said:
I have a query that I have created to pull data from 3 tables that I cannot
edit. That is I don't own the tables so I cannot modify them. What I am
looking for is a way to keep track of the records tha I have printed, so I
don't print them again. The only way I can think to do this is have another
table that keeps track of the records I have printed. Is there an easier
way to do this, and what would be the easiest way to check the records from
one table against the other.

If you can not modify the original records, then you'll have
to have another table to keep track of it. I suggest that
the new, Printed table have at least two fields: the PK of
the original record and the data/time that it was printed.

The easiest way to check the records from one table to
another is to Join the two tables in a query. An Inner Join
will only return records where the connecting field exists
in both tables.
 
The problem with InerJoin, is that I would want the records that have not
been printed. That is the records that did not exist in in printed table.

Bob
 
Bob said:
The problem with InerJoin, is that I would want the records that have not
been printed. That is the records that did not exist in in printed table.

In that case use what's sometimes called a frustrated outer
join:

SELECT Maintable .*
FROM Maintable Left Join Printed
ON Maintable.ID = Printed.ID
WHERE Printed.ID Is Null



 
Back
Top