How do i Add Column with data to existing table.

Anonymous
2023-03-20T07:46:36+00:00

Hello.

I have a problem.

I have 1 table with lets say 30 columns and 220,000 rows.

And i have another table with 1 column

In the first table i have a field with item number and in the second table i have only selected item numbers that fulfill special criteria.

What i want to do is to this first big table add column in the end and insert there 0 or 1 . 1 if item number exists in second table and 0 if it doesnt. I have been trying to do lots of weird things but none work as i would like it to :(

Any ideas for newbie ?

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2023-03-20T10:08:21+00:00

    Here is a very simple example:

    The tables:

    and

    The query in design view:

    The query in datasheet view:

    You can use the query as record source for forms and reports.

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2023-03-20T09:42:09+00:00

    Do you really need to add a column to the first table? You can return the 0/1 (or False/True) in a query based on both tables, with a left join on item number.

    0 comments No comments
  2. Anonymous
    2023-03-20T09:45:25+00:00

    I need all the data that is contained in the first table (nothing is allowed to be missing) for further report generation.

    If i make query joining them by item number , what will be the result ?

    0 comments No comments
  3. Anonymous
    2023-03-20T10:27:42+00:00

    Amazing, this is what i needed !!!

    Thank you so much :)

    It's so hard to understand how what works.

    0 comments No comments
  4. Anonymous
    2023-03-21T00:16:52+00:00

    https://www.w3schools.com/sql/sql\_join\_left.asp

    this may be helpful to understand.

    0 comments No comments