473,388 Members | 1,322 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

MS Access 2013 Problems creating an Access query that will combine the best and worst

I'm having trouble getting this query worked out. In my table, the relevant fields (with descriptions) are:
SKU(the Item Number), StorageType (the type of rack the item is stored in, IE: pallet, half-pallet), Location (obvious), QuantityPicked (obvious), Area ('Front' or 'Back' of the warehouse)

What I need to do is find instances where the QuantityPicked is 0 and the Location is Front (meaning the item is sitting near the front of the warehouse and not being sold) and swap it with items where the QuantityPicked is >0 and the Location is Back (meaning the item is being sold actively and it is stored in the back of the warehouse). Additionally, the StorageType must match (ie: I don't want to try to fit a full pallet into a half-pallet slot, or vice-versa).

Every permuatation I come up with ends up with items being duplicated as it tries to synch up the StorageType. I'll get a copy of every item that has a quantity for every location where the StorageType matches up with an item location that doesn't have a quantity.

If I have 3 pallet items with a quantity and 5 pallet items without a quantity, I'll get 15 records returned. What I would like to see is 3 records returned, matching those with a quantity to a location without one (and then either ignoring the remaining two empty slots or just pairing them with a Null.

At this point I'm thinking of weird solutions like creating multtiple recordsets and doing some sort of weird filtering when generating the report, but I'm not sure if that's just the exhaustion speaking or if there really isn't a better way.

Any advice or pointers would be greatly appreciated!
Nov 16 '14 #1
1 1068
Rabbit
12,516 Expert Mod 8TB
Create two separate queries. Union the results if you want them together
Nov 16 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Wayne Aprato | last post by:
Can anyone shed any light on the following problem which has shown itself in a couple of my Access 97 databases. When I ask Access to open a form that is based on a query, it will randomly fall...
10
by: B Moor | last post by:
Host PC: Win SBS 2003 with 2.6 GHz processor and 1GB RAM SQL Server 2000 sp3 (or latest).MS Office 2k3 I have the access 2k3 front end running on server (this may get changed) and all was well...
3
by: paulquinlan100 | last post by:
Hi Im trying to programmatically create a query so that it can be exported to excel using docmd.outputto. I can do this easily enough with a saved query, but as the user has a variety of options...
4
by: DeanL | last post by:
Hi Guys, I need some help creating a query that is going to take between 1 and 10 parameters. The parameters are entered on a form into text boxes that may have data or be empty. Is there a...
1
newnewbie
by: newnewbie | last post by:
Desperately need help in creating a query to count unique values in a table. I am a Business analyst with limited knowledge of Access….My boss got me ODBC connection to the underlying tables for our...
4
by: The.Daryl.Lu | last post by:
Hi, Have a bit of a problem... I've created a form in Access and will use the form for a user to query a table based on the selected fields. The problem lies in that I was using checkboxes for...
0
by: steveradaza | last post by:
Sir,Good Day..I am a newbie here and i am just learning the usage of microsoft access..can you help me solve my problem in making a running balance in a query of microsoft access 2013 of my In and...
4
by: nomeepk | last post by:
hi, i am using access 2013, Is there a way i can make this Access Database online, so i can access and use it from anywhere in a Browser? Regards.
5
by: jimatqsi | last post by:
I'm looking for information about compatibility between Access 2013 and Access 2003. I've been approached by a firm that wants to begin upgrading their systems. I want to know if it is reasonable...
0
by: LeoVBNET | last post by:
Hi Because VS 2013 dropped SQL COMPACT databases, I need to convert Access 2013 databases into SQL COMPACT in order to be able to use Linq to SQL in VB 2013. Anybody can help me? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.