Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-05-2016, 10:14 AM   #1
mjdemaris
Working on it...
 
Join Date: Jul 2015
Location: Washington State, USA
Posts: 338
Thanks: 72
Thanked 7 Times in 7 Posts
mjdemaris is on a distinguished road
Append query, multiple tables

I am wondering if I can take data from table Sheet1 and append it to table ItemLocations, using the MasterNumber as a flag/link for the records.

BinText is simply the textual location identifier, ie: WH1 A A1 (warehouse, isle, section, shelf)

I imported and manipulated the data from Excel to create Sheet1, and would rather not enter each record manually, as there are about 3000. I already had to do that for vendor part numbers - because the old system uses the Master number as a PK of sorts, but that does not work with this system.

Thanks.

See attached picture for tables.
Attached Images
File Type: png ItemLocAppend.PNG (5.1 KB, 110 views)

__________________
Life is not a problem to be solved, but a reality to experience.

Soren Kierkegaard
mjdemaris is offline   Reply With Quote
Old 05-05-2016, 11:16 AM   #2
mjdemaris
Working on it...
 
Join Date: Jul 2015
Location: Washington State, USA
Posts: 338
Thanks: 72
Thanked 7 Times in 7 Posts
mjdemaris is on a distinguished road
Re: Append query, multiple tables

Here is the query I used to solve this:
Code:
INSERT INTO ItemLocations ( ItemID_FK, BinID_FK, WinterLevel, SummerLevel )
SELECT Items.ItemID, [Q-BinCmb].BinID, Sheet1.[Winter Stock Level], Sheet1.[Summer Stock Level]
FROM Items INNER JOIN (Sheet1 INNER JOIN [Q-BinCmb] ON Sheet1.Bin = [Q-BinCmb].Location) ON Items.MasterNum = Sheet1.[Master Part Number]
WHERE (([Items].[MasterNum]=[Sheet1].[Master Part Number]) AND ([Sheet1].[Bin]=[Q-BinCmb].[Location]) AND (Not (Sheet1.Bin) Is Null));
__________________
Life is not a problem to be solved, but a reality to experience.

Soren Kierkegaard
mjdemaris is offline   Reply With Quote
Reply

Tags
append , multi table , query

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Append Query that can append to multiple tables JuniorWoodchuck24 Queries 3 05-25-2011 12:56 AM
Query to append multiple tables accessaspire219 Queries 2 05-06-2009 08:04 AM
Append Query, multiple tables to multiple tables in another database jonyquek Queries 4 11-29-2007 04:59 PM
Append query - appending multiple tables quickly gotidude Queries 1 08-12-2005 03:51 PM
Append Query to multiple tables databasedonr Queries 2 02-13-2003 03:24 PM




All times are GMT -8. The time now is 06:42 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World