Append query to same table

G

Guest

Hey!

This must be easy, but I can't find it nor figure it out.

I have a database with addresses in it. When I change an address [even a
small part of it] I need to mark the old record as obsolete with a date and
create a new record, sometimes almost identical to the old one and modify it.
To make it easier, I am sent only the changed fields in excel. :)

I have got all of this down, except how do I append 5 duplicate records
[with an auto number index field] for me to run an update query on?

The process as I see it is to add five dup records [append query], mark the
original records as obsolete [update query] and alter the duplicated records
with the minor changes [update query].

Thank you!
 
M

Michel Walsh

Hi,


why touching existing records? their date (date_time value) will indicate
they are not the most recent anyhow, if a new one is in the database. To get
only the most recent records, take any of the four methods in
http://www.mvps.org/access/queries/qry0020.htm), and that automatically take
"un-care" of the old records, without any need to "mark" them as obsolete..
since they implicitly are, due to their date being older than the date of
another record.


Hoping it may help,
Vanderghast, Access MVP
 
G

Guest

Mike,

Thank you!

My problem is not one of being able to distinguish old from new records - it
is one of adding 150 almost identical records to a database. My hope was I
could use some sort of append query after isolating which records would be
almost duplicated and then an update query on the same record set to make the
minor changes.

I can accomplish all of this except create an append query which appends
copies of the 150ish records with new auto number fields to the database.

Am I making sense? LOL. I have roughly 150 addresses which need changes
like Street being changed to St. And I need to keep the old records for
history. So I thought I'd append copies of the 150ish records, and use a
variety of update queries to make the changes [to the fresh copied records].
I just can't figure out how to create an append query that copies existing
records in a file and appends them to the end of the database.

Thanks!

Patrick

Michel Walsh said:
Hi,


why touching existing records? their date (date_time value) will indicate
they are not the most recent anyhow, if a new one is in the database. To get
only the most recent records, take any of the four methods in
http://www.mvps.org/access/queries/qry0020.htm), and that automatically take
"un-care" of the old records, without any need to "mark" them as obsolete..
since they implicitly are, due to their date being older than the date of
another record.


Hoping it may help,
Vanderghast, Access MVP

Patrick said:
Hey!

This must be easy, but I can't find it nor figure it out.

I have a database with addresses in it. When I change an address [even a
small part of it] I need to mark the old record as obsolete with a date
and
create a new record, sometimes almost identical to the old one and modify
it.
To make it easier, I am sent only the changed fields in excel. :)

I have got all of this down, except how do I append 5 duplicate records
[with an auto number index field] for me to run an update query on?

The process as I see it is to add five dup records [append query], mark
the
original records as obsolete [update query] and alter the duplicated
records
with the minor changes [update query].

Thank you!
 
J

John Vinson

I just can't figure out how to create an append query that copies existing
records in a file and appends them to the end of the database.

Well, create an append query based on your table, and when asked what
table to append to, name the same table.

You just can't include the Primary Key in the append query (or the
records will be rejected for violating the unique key). If you have an
autonumber primary key, simply don't include it in the fields that you
select to append.

John W. Vinson[MVP]
 
G

Guest

Ok. I'm embarassed by this one. No wonder I couldn't find it anywhere.
It's too stupid.

Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top