Results 1 to 3 of 3

Thread: query multiple tables

  1. #1
    Join Date
    Aug 2015
    Posts
    1

    query multiple tables

    I have two tables that I need to query and combine. First table is the template and has part number, group number and serial number, with serial number being blank. Second table being imported has part number, group number and serial number, which serial number is provided. I need to compare part number and group Id and have the serial number value added to template. I am new to access and not sure how to query and build a table out of two tables.

  2. #2
    Join Date
    Nov 2020
    Posts
    36
    This is an UPDATE Query which must JOIN two tables with compound link on 2 fields: part number and group number. Use the query builder to help construct.

  3. #3
    Join Date
    Aug 2022
    Posts
    22
    In Microsoft Access, you can use a query to combine data from multiple tables and update the serial number column in the template table with the values from the imported table. You can use an Update query to update the serial number column in the template table with the values from the imported table based on the matching part number and group Id.

    Here is an example of how you can create an Update query to update the serial number column in the template table with the values from the imported table:

    UPDATE template
    INNER JOIN imported ON template.part_number = imported.part_number AND template.group_id = imported.group_id
    SET template.serial_number = imported.serial_number;

    Alternatively, you can use a SELECT query to create a new table that combines data from the two tables and includes the serial number column from the imported table.

    Here is an example of how you can create a SELECT query to create a new table that combines data from the two tables and includes the serial number column from the imported table:

    SELECT template.part_number, template.group_id, imported.serial_number
    FROM template
    INNER JOIN imported ON template.part_number = imported.part_number AND template.group_id = imported.group_id;

    You can then save the query as a new table, or export it to a new table in the database. You can also use the query to create a new table in another format (e.g. excel)

    Please keep in mind that the specific syntax and commands used to query and combine data from multiple tables in Microsoft Access may vary depending on the version of Access and the specific database design. It is always recommended to consult the official documentation of the product for the same.

Posting Permissions

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