Merging Tables With Unmatched Keys

Nov 12, 2007

Hi all, im hoping someone can help. This is the problem.

I have 3 tables that have tax payer information for 1 year broken up into 4 months, 1 table for each 4 month chunk. all 3 tables mostly have the same taxpayers, but each table has payers that are not in 1 or both of the other tables. each table has a 2 part primary key, the business number is the first part, and branch number for businesses with chains. the next 4 fields are each month of taxes paid. heres the design of each table.

Q1
ID 1ID2Data1 Data2 Data3
10
20
31
40
50

Q2
ID1ID2Data1 Data2 Data3
20
40
61
81
Q3
31Data1 Data2 Data3
40
61
81
90
100

is there an easy way to merge all of this data into 1 table easily. ive tried using make table or append queries, but it only addes the information where the IDs are in each table. this leaves out the ids that are in only 1 or 2 tables.

if you need me to clarify or explain anything else, please let me know. i can post screenies or the design, but obviously, not the data.

View Replies


ADVERTISEMENT

Queries :: Design Unmatched Query On 2 Tables

Oct 22, 2013

I need to design an unmatched query on 2 tables to identify employees names that exist in 1 table but not the other (or names are misspelled, etc.). The tables exist in on a server and I do not have the ability to change either. Table 1 has the following structure:

EMPLOYEE NAME: Doe, John ID-12345
Table 2 has the following structure:
LAST NAME: Doe
FIRST NAME: John

Since the field names are not equal, the unmatched query wizard (as far as I know) will not work. I've tried using "NOT LIKE", LEFT JOINS, RIGHT JOINS, NUll Values, etc. in the SQL but nothing has worked as yet.Here's the SQL I've been working with but this returns all values (haven't figured out why):

SELECT DISTINCT [Table 1].[EMPLOYEE NAME]
FROM [Table 1], Table 2
WHERE ((([Table 1].[EMPLOYEE NAME]) Not Like "([Table 2].[LAST NAME]*"));

View 2 Replies View Related

Queries :: Unmatched Records - Could Not Delete From Specified Tables

Jun 19, 2015

I was able to create a query that selects records from one table that have several fields which don't match with another table.

The end-game with this query is to have it delete the records in table 1 that don't match records in table 2. The delete query tells me that it could not delete from specified tables.

I've attached the select query, the delete query and the error, and the relationship table for the db.

View 8 Replies View Related

Update Tables With Missing Data Without Using Unmatched Query?

Aug 13, 2013

I have an access database with several linked tables (linked to MySQL database) and several local tables. The theory is that if there's ever a connection issue, the device connected to the computer will continue logging data to the local tables. Once a connection is re-established, the linked tables should be updated with all the missing records which appear on the local tables.

I found several possibilities which I outlined below, but I've been asked to investigate whether there's a built in function in access that does this for you and use the other options as a last resort. Does access have any program feature that updates one table with missing data from another table, or will I have to write VBA code to do that? Options I've discovered:

1) Write unmatched query and insert missing data into table.

2) Create a linked table on MySQL that will link to the local tables on access, then compare the records there.The boss isn't happy with those options because he wants to keep the amount of code we add to a minimum. Ultimately, we hope that a program feature that does this is built in to access. If not, I have no problem adding code to do this instead.

View 1 Replies View Related

Unmatched Query To Find Changed Info Between Tables

Aug 24, 2012

I am importing the updated Employee Roster information from Excel to a table called "Weekly Roster Check" (contains new info). I have a table called "Current Chit Board" that has an Employee Roster that I update every week (contains old info). I want a query to find employees who are promoted and their title has changed. then I want to run an update query to update these results to the Current Chit Board table.

Every method I try, returns either no information or information that is not what I want.

View 3 Replies View Related

Help Merging Tables

Aug 24, 2007

Hi, I'm very new to access so sorry if this request seems a bit stupid.

I'm trying to get one csv file for a database of cars so I can upload it to my open-realty account.

In one table is the car ID and there are fields like Price, Extras, Mileage etc associated to that ID. (this is how I want everything to stay) I would like additional fields like Photo 1, photo 2, photo 3....photo 25 related to each car.

In the second table there are photos of the cars but each photo has its own unique ID but a field that relates to the ID of the car it is associated to.

How do I merge the two tables into one simpler version?

I've attached screen shots of the two tables.

Thanks for any help.

View 7 Replies View Related

Merging Tables

Jan 27, 2005

Hello
I need to merge a set of Access tables. I am creating a database which will hold a large amount of records (upto 250 000 in one table). I am importing the data from an excel spreadsheet. As each spreadsheet is limited to 65000 records I had to save the file in 4 different spreadheets. However in Access I need all these files saved in one table. Can anyone please help me?

Thanks

Nathan

View 4 Replies View Related

Merging Tables

Jun 14, 2006

Hello first post here, I need some help!Sorry not sure if this should go under queries or tables.Anyway I'm working with quite a large access db (64mb).I want to merge data from several tables into one table.Its a supermarket db (not a real one). Its got a customer and product tableIts also got a table called agg_c_special_sales_fact_1997with the fields customer_id and product_id this shows what customers bought what product.I want to merge the data from customer, product and agg_c_special_sales_fact_1997 into one big table. I want the merge to be permanent so I can see the which customer (and all their details) bought which product (all details) in one big table. I ve been trying to do this all day (im quite new to SQL) I copied the data in agg_c_special_sales_fact_1997 into a new table "new_sales_fact". I added a row called brand_name to that I want to copy from the product tableSo far I ve come up with this:SELECT product.brand_name INTO new_sales_fact FROM product, agg_c_special_sales_fact_1997WHERE product.product_id = agg_c_special_sales_fact_1997.product.id;unfortuantely access asks me enter a parameter value when I run the query.Could this becuase agg_c_special_sales_fact_1997 is huge, its got 86,000+records?Can anyone help? I'd be most greatful this has been driving me insane all day!!thanks in advance! P.S the database is the test database that comes with Mondrian......P.P.S I know its not good practice to have all data in one big table but for the purposes of what im doing it will simplfy things a lot!

View 4 Replies View Related

Merging Tables

Aug 14, 2007

Hello all

I'm not really an Access programmer, but I maintain a couple of databases for my own use (music collection etc.). I hope no-one minds me posting here :)

I've made a bit of a mistake. I had two copies of a database on different machines, and I entered new data into both of them.

Is there any way of merging two tables, discarding any records which are identical?

Many thanks in advance for any responses!

Cheers

Gareth

View 6 Replies View Related

Merging Tables?

Nov 14, 2007

Hi all :) I have 22 tables in my Access database, which is my catalogue data. I have it set up on dreamweaver. Now tho, i need a search engine going thro it, i have a script in access/dreamweaver that works. Only thing is, that the script only works thro one table. Now, is there some way to merge tables into one? Not just copy and paste, but all have the same specific name that i maybe able to link? (ie Name, description, code) Any ideas? A tutorial link would be great if anyone has come across a similar thing, thx!

View 1 Replies View Related

Merging Tables

Dec 10, 2006

Hi,

I have a few tables with the same row and column headings but contain different data in their cells. Is there a query whereby I can basically merge everything to give me one view with everything in it?

Thanks

Greg.

View 1 Replies View Related

Merging Tables

Sep 25, 2007

Hi,

I'm an access newbie and was wondering how to merge two tables. for example, i have:

table1
col1 col2 col3

and

table2
col1 col2 col3

They have the same column names, I just want to put the data from the first table in the second one. I don't care about duplicates for the moment, there is no primary key.

Thanks

View 3 Replies View Related

Merging 2 Tables

Jan 9, 2005

Hi,
i am required to merge 2 tables and to be able to present the data out in a report. the prob is i do not noe how. both the tables do not haf an unique field which means all entries in each field are repeated. the size of each table is different. is it a must for the 2 tables to be the same size?the fields for the 1st table are as follows:Country, Company Code, Company, Product Group, Material, Date, Actual Qty and Final Forecast. the fields for the other table are: Country, Company Code, Company, Product Group, Material, Date, Sales adjusted forecasted and final forecast. the "date" field from each table are different. the 1st table will show the actual qty of goods delivered while the latter will show the forecasted qty. i am required to be able to extract out the data for eg to show the actual qty delivered from jan to jul and the forecasted value from aug to dec.
pls help....

View 2 Replies View Related

Foreign Keys And Tables

Sep 25, 2006

hi
i need to create a table, i've figured out to make LastName the primary key. But im not so sure about the foreign key, and whether it is necessary to put it into the table in order for all my tables to relate? Sorry if this doesn't make much sense.
Also, to clarify.. 3NF primary keys in one table cannot be used in another table??
thanks

View 2 Replies View Related

Merging Two Tables And Totalling

Dec 13, 2006

Ok, I have a problem. I have two tables with different data pulled from two different areas, but that have the same type of information in them. I need them merged into one query or table so it can be exported into excel.

The problem is that one table has data only once (has a primary key, then things by building and grade). The other table has it's primary key, but then could have more then one building and grade combination (i.e. building 1050 grade 8 membership of 10 more then once becuase off another factor).

I need to merge this stuff by query of some kind into another query or table that totals all things with the same primary key, building and grade. So there is only one line for xxx-xxx building 1050 grade 8 with the grand total of membership for all.

How do I do that?

View 1 Replies View Related

Merging Multiple Tables?

Oct 26, 2007

I have data that splite by month, so january data separated from february data, an so on.
can i display those data on one table by using query?
if yes.how can i do that?

thanks

View 5 Replies View Related

Getting/merging Results From 2 Tables

Jan 25, 2008

I've got some tables I pulled off GeoNames.org that I need to extract data from. One table has everything I need except the counties listed in it. Instead of that, it gives a county code. The other table has the actual county names associated with those codes.In the main table, country and state are listed similar to "US" and "WA", representing U.S.A. and Washington state, with the city name ("Seattle") also displayed in a separate field. A county may be displayed as a county code of 003 or 101, or any such 3-digit number. The thing is, multiple counties can have the same county code, since each state's counties start their numbering over at 001, 003, 005, etc.In the county table, one column has the country, state, and county code in one field similar to US.WA.003, and the county name ("King County") in another field.What I need to do with this info is create a new table that will have only the country, state, county, and city names (omitting the text "County", if possible). So, my final result would be: US, WA, King, SeattleI just don't know how to pull the data from each table while merging the county information.The reason I haven't included the examples of the tables I'm using is because I'm hoping to be able to put together the query myself, with the help you all can provide me with. Alot of times, there are well-intentioned people who are kind enough to layout everything exactly as you need it to come up with finished results, and I'd just like to get the opportunity to take a shot at it myself first. If I can't get it from there, believe me, I'll be back for more help.Thanks in advance.

View 10 Replies View Related

Updating Tables With Missing Keys

Jul 25, 2005

Hello,

I'm designing a database that is used both in the office and field and it has two tables - an "office" table and a "field" table. The office table is a list of addresses, cities, and counties, each with a custom-designed key field. The field table contains equipment information at each location specified in the office table.

What I want to do is set up the database so that field personnel can copy an updated office table (with new locations added or old locations removed) into their databse and click something and have the tables "resync" with each other - the field table automatically adding new records to match those in the office table or delete records it has that it doesn't find in the office table...

Any thoughts or helpful links?

View 5 Replies View Related

Join 2 Tables With Composite Keys

Oct 3, 2007

Hi,

I am trying to join 2 tables with composite keys - each of them have the same 4 columns as part of its key - date/person/problem/date sent.

Table 1 has 5 columns (4 key columns + 1), Table 2 has the same 5 columns plus 1 additional column (Comments).

I am trying to match the Comments column in Table 2 to Table 1 and show the output in another table.

Currently, I've related the 4 columns in each table to each other, each relationship defined as including all records from Table 1 and only the records from Table 2 where the fields are equal.

In the fields, I have 5 Columns from Table 1 and the last column (Comments) from Table 2. When I run the query, I get all the records from Table 1, but not all of the Comments that match from Table 2 are shown.

Any Ideas on how to improve this link?

Thanks!!!

View 7 Replies View Related

Tables :: Merging Two Like Tables From Two Databases

Nov 4, 2013

I've currently come across the issue where an end user copied the database locally to their computer and has been using it for months and months. After fixing an issue in the database on the server and then finding that someone still had a database bug is how I figured this out. Anyway, what would be the best way for me to merge the table 1 from the database she was using to table 1 in the database on the server? Is there a way to export a table so I can then import the data? Like I said, the databases are identical other then the data.

View 3 Replies View Related

Merging Tables And Retaining Data

Oct 19, 2004

Newbie here,
i have two tables with 3 fields in each (code, Description and amount)
what i need to do is join these two together to show data from both tables (some of the
data in fields one and two will be identical, but the third fields in both
tables will need separate entries for each table)
the primary key would be the first field (code) ysee, the original table has been updated
by a n other, some codes and descriptions changed for others so, i would like to end up with
feild one, all codes from both tables, field two,
all descriptions matched to codes from both tables,
field three numbers matching from first table, field
four numbers matching from second table.

is this a possibility?

please help...loosing hair!

Paul

View 14 Replies View Related

Queries :: Merging Info From 2 Tables

Nov 15, 2013

I am trying to update an existing table in Access with current information that I have imported into Access from excel into a separate table. I was able to use an unmatching query and append all records that were not already in the original table. But there are records in the update table that match the original table, and there in information in fields within that records have new information.I need to find the records that match in the two tables and update the missing data.I am able to create a query that displays the matching records but when I run it as an update query the information in not entered into the original table.

View 7 Replies View Related

Bridge Tables W/composite Primary Keys

May 17, 2007

I am creating a bridge table to get rid of redundant data. I am doing it by making a composite of the primary keys from the two tables I am bridging.
The error message when I get to a certain point is "You cannot add or change a record because a related record is required in table tblMachCent." Both the numbers I am using to create this composite key are in the tables necessary, so I am not sure why I am getting this problem. Any suggestions??

View 1 Replies View Related

Tables :: Two Primary Keys Link To Another Table?

Aug 18, 2014

So, I have two Primary Keys in my table, how then do I link another tables to it?

tblAdmissions
PatientID Number Primary Key
Visits Number Primary Key

tblRoomPhoneNumbers
PhoneID AutoNumber Primary Key

View 3 Replies View Related

Tables :: Use Of Standard Access IDs As Primary Keys

Feb 12, 2014

I've built a system with around 20 tables in it. All of these use the standard ID field offered by default by Access as the primary key. A friend with a background in database design and development for large corporates using Oracle has reviewed the database (he is going to do some VBA programming for me) and suggested that we use more appropriate primary keys based on data attributes.

He has read "somewhere" that there are problems with the standard ID fields and that occasionally the fields are renumbered/reindexed and that this can cause problems. There are a fair number of queries and some complex forms which will need to be updated for these changes but it would be a shame to go through all this work if it isn't really.

Should we use the standard Access IDs and is it worth a chunk of effort to change from where we are now?

View 6 Replies View Related

Merging Excel File Into Multiple Tables?

Apr 18, 2005

I'm in the process of creating a database to track campaign contributions, and I'm kind of stuck.

I've created tables for the citizens, the candidates, and the contributions to the candidates. Now I'm trying to populate them with an Excel spreadsheet. The problem is I have no clue on how to split the Excel file so the appropriate parts go into each table.

The spreadsheet contains:
Name, address, etc. - This needs to go into the Citizens table
Names of candidates individuals contributed to - This needs to go into the candidates table.
Dollar amounts and dates of contributions - This needs to go into the contributions table.

Each citizen may have made multiple contributions to multiple candidates.

The easy way would be for everything to be in one table, but that would be a bad database design, right? Here's a shortened version of how my tables are designed:

Citizens: Name, contact info, etc. of citizens
Candidates: Name, party affiliation, etc. of candidates
Contributions: Candidate (fk is pk of Candidate table), Citizen (fk is pk of citizen table), contribution date, and contribution amount.

I appreciate the assistance, as I'm getting really frustrated.

J.C.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved