How to merge two separate append queries

  • Thread starter Thread starter subbu
  • Start date Start date
S

subbu

Hi,
I have 5 independent append queries.My requirement is
that the result of these queries has to update the single
row in the destination table.Is my approach correct in
going for append query?How to go about updating the single
row

subbu
 
Hi,
I have 5 independent append queries.My requirement is
that the result of these queries has to update the single
row in the destination table.Is my approach correct in
going for append query?How to go about updating the single
row

subbu

Dear Subbu:

An append query adds rows to a table but does not update any of the
existing rows of the table. An update query does not change the
number of rows in a table, but can change certain columns in specified
rows of the table.

To update a single row, there must be some unique key to that row
specified in the WHERE clause of the update. I believe this is the
key to what you want to do.

But, you say, "the single row in the destination table." If indeed
there is only one row, you can dispense with the WHERE clause, thereby
updating all the rows in the table, which is to say the only row.

Your post has possibly quite confused me in these regards, but I have
tried to be of some help if possible.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Hi,
I have 5 independent append queries.My requirement is
that the result of these queries has to update the single
row in the destination table.Is my approach correct in
going for append query?

An Append query does what its name implies: it Appends new rows to an
existing table. If you have an Append query which returns 200 rows,
and you are appending to a table which contains 1000 rows, the table
will then contain 1200 rows.

If you want to update a single row in a destination table, an Update
query will be needed. How you're going to append five tables to a
single record I do not know. What is this "single row in the
destination table" supposed to contain after the queries run?
 
Hi,
I wanted the result of the 5 queries go as one insert
the destination table.How to achieve the same

subbu
 
Hi,
I wanted the result of the 5 queries go as one insert
the destination table.How to achieve the same

subbu

Your requirements are not very clear to me, so I'll try to make a
generally helpful statement that may help move you toward your goal.

It now sounds like you want to add one or more rows to an existing
table without changing any of the rows that may already be in that
table.

To do this, first write a SELECT query whose result looks exactly like
what you want to add to the table. Then just change that query into
an append query. At a minimum, it must contain all the required
columns of the table into which you wish to insert.

This SELECT query would be based on your 5 queries.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top