append query: delete records that are exactly the same

jaomata

New member
Local time
Today, 15:50
Joined
Dec 3, 2001
Messages
9
MERRY CHRISTMAS and a HAPPY NEW YEAR!!!!
smile.gif


I'm not sure how to put this very clear. Here it goes: I am trying to place new records from a table to a new table. I did an append query to place the records from one table to the other. But my next problem is, I need to append again -- but this time, only those new records should be in the new table.

For example:

table1 has: record1, record2, record3, record4
then I do an append to table2
therefore, table2 will have record1, record2, record3, record4
then table1 gets an additional records
so, table1 has record1, record2, record3, record4, record5, record6
then I will do another append query to update table2, but I need table2 to be: record5, and record6 only. since record1 to record4 were already used.

Please help me on this one. I couldn't figure out how to solve this. If you have any other solutions to do this task, please let me know. Thank you.
 
you have a problem with the design of your tables.

you need to have a primary key that is unique to do this, so that previously appended records are not duplicated.

why don't you post the design of your tables.

hth,
al
 
No there's no problem with the design with the table. That is the task I need to do. Because I want to print the records, then after printing, the user may need to add new records. And I need to print the new ones but not deleting the main table of records. Is it confusing?

Okay, after I print my records, the user will add new records. then I need to print only the new records. But at the end, I will still need the entire records to be printed again, kind of like the master list. So basically I will have three sets of print out. The first one, then the new ones, then both the first and the new ones.
 
Jaomata,

Take pcs' advice an review you design. There are probably various ways to approach your problem more efficiently.

For example, if you want to make a distinction between records that have been printed at least once and records that haven t been printed yet, you could have a boolean field in your table (bIsPrinted) and set its value to true when a given record record is printed. Then use this field to check and treat differently printed and not printed records.

You should provide us with more details if you would like us to give more accurate help.

Alex

[This message has been edited by Alexandre (edited 12-26-2001).]
 

Users who are viewing this thread

Back
Top Bottom