• Help With Append Query (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Help With Append Query (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Author
    Topic
    #445502

    I have a table with the following records

    Specialty ID	Specialty
    1	Optometrist
    2	Children's Dentist
    3	General Dentistry
    4	New Dentist 
    5	Orthodontics 
    

    I’m trying to add one record to the table with this append query

    INSERT INTO tblSpecialties ( strSpecialty )
    SELECT "NA" AS Expr1
    FROM tblSpecialties;
    

    And I am getting the following 5 records

    Specialty ID	Specialty
    6	NA
    7	NA
    8	NA
    9	NA
    10	NA
    

    Specialty ID is a autonumber

    What do i have the change to just get the one record
    6 NA

    Thanks, John

    Viewing 0 reply threads
    Author
    Replies
    • #1080346

      Because of the SELECT … FROM …, you’ll add as many records as there already were
      INSERT INTO has another form where you add a single record:

      INSERT INTO tblSpecialties ( strSpecialty )
      VALUES ( “NA” )

    Viewing 0 reply threads
    Reply To: Help With Append Query (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: