Query help

  • Thread starter Thread starter Raz
  • Start date Start date
R

Raz

I have a table with the following columns: ContactID, Year and Status.
I need to write a query which will take the following records:
ContactID = 'XXXX', Year = '2003' and Status = 'Member' an duplicate
them while upgrading the year to '2004'.

I have tried to use the INSERT INTO command but as yet have failed to
achieve what I am after. Any help would be appreciated.
 
Hi Raz,

Try creating an append query in Access. First just
create a new query in design mode, add the table and
fields to your design grid, then change the query type to
append and enter your criteria on the criteria row.

But, for the data source for the appended year field,
instead of selecting the table's Year field as the
source, just enter an additional column with the
calculated value of 2004. Then, specify that this column
should be appended as the [Year] field. Note that you
will need your source [Year] field in your query also in
order to specify the criteria = 2003, but you will not
select a field name in the "Append To" row for that
column, instead it will just be a where condition. I
hope that makes sense. Post back if it doesn't work.

-Ted Allen
 

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

Back
Top