Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Location
    South Australia
    Posts
    39

    Unanswered: Append vs Update

    Hi

    I'm just experienceing some confusion as to whether I need to use an append or a an update query.
    I have a situation where I have one table with a list of some students, from all year levels. There is a second table which contains all of the year 12 students, as well as a unique registration number for each. The two share a StudentID field which links them.
    What I need to do is somehow add all of the Student ID's and Registation Numbers to the first table. I created an append query, but this only adds records - it does not update those students already entered with their registration number.

    For example, in my test I had two students entered in the first table. They did not yet have a reg number. When I ran the append query it added 190 something records of student ID's and their Reg numbers, but left the Reg numbers of the two previously entered students blank.

    Am I going about this the wrong way? I am not very familiar with append queries, and so I'm not sure if they will do what I want. Do I need to create a sencond, update query to achieve this?

    I realise that this may have been covered before, but I'm having trouble finding what I need. Even if someone could point me to a particular thread it would be much appreciated.

    Cheers,
    Frekster

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Quote Originally Posted by frekster22
    I am not very familiar with append queries, and so I'm not sure if they will do what I want. Do I need to create a sencond, update query to achieve this?
    yes

    An append query adds rows to a table
    An Update query changes data already in a table

    Is that enough info

    Dave

  3. #3
    Join Date
    Aug 2003
    Location
    Cleveland USA
    Posts
    184

    Cool

    First, you want to get all the records into table1. Create an "unmatched" query to figure out which records are in table2 but not table1. Then, change that to an append query and append all these records to table1. For the records with no 'unique number', you'll have to update them either manually or with an update query, whichever is faster.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •