Why can't I do an Append Update Query

N

NeedAccessHelp

Please explain why there isn't an Append Update Query function. How can I
create a query to append and update data?
 
T

tina

appending data refers to adding one or more *new* records to a table.
updating data refers to changing data in one or more fields in one or more
*existing* records in a table. the two actions are different; you can't do
both in a single query. write a query to append the new records, and write a
query to update existing records; run first one and then the other.

as for *why* you can't do both in a single action query - well, why can't
you apply the brakes in your car by turning the steering wheel?

hth
 
V

Van T. Dinh

Well ... there is a an append side-effect if the Update Query is constructed
a certain way in JET which I don't agree with. I prefer it is either an
Update Query or an Append Query but not both. Almost all, if not all, other
database engines don't allow Update & Append in an SQL statement, either.

In fact, sometimes, I have to code / construct SQL to get rid of the
side-effect as I prefer the logic to be shown clearly in my database.
 
N

NeedAccessHelp

Thanks for the info. I believe the old Paradox programs allowed it. It's been
awhile. Anyway I decided to restructure my tables and forms alittle
different. I had tried using indexes but that didn't work. The DMax function,
which didn't work either. I tried this and more just to get the report to
show the latest status of an employees workload. The employee would enter the
current status of a file in a form. In turn two tables would be populated.
One with the current status and another with a running history of that file.
But the status could be duplicated based on where the employee is relative to
his/her analysis of the file. I wanted the report to show the latest and
thought that a simple append query would work. But it does not update so I
restructured the tables and form alittle and it now works. Thanks.
 
V

Van T. Dinh

You're welcome ... Glad you woked it out since I got lost with your
description. ...
 
Top