473,651 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stock Code Relation to Many Purchase Orders

I have been trying and looking for a few days to a solution into a
query

I am looking up one stock code from a table containing multiple
outstanding purchase orders for that one item.

The problem comes in that I'd like to display all those PO numbers in
one cell.

Example:

StockCode Purchase Orders
0123456789 45-1234, 46-4567, 47-4546
Can anyone help ... or lead me in a direction?

May 2 '07 #1
5 1844
So right now you're returning:

StockCode, [Purchase Orders]
0123456789, 45-1234
0123456789, 46-4567
0123456789, 47-4546

So you need:
http://www.rogersacces slibrary.com/Otherdownload.a sp?SampleName=' Generic%20Funct ion%20To%20Conc atenate%20Child %20Records'

Cheers,
Jason Lepack

On May 2, 4:22 pm, walt...@gmail.c om wrote:
I have been trying and looking for a few days to a solution into a
query

I am looking up one stock code from a table containing multiple
outstanding purchase orders for that one item.

The problem comes in that I'd like to display all those PO numbers in
one cell.

Example:

StockCode Purchase Orders
0123456789 45-1234, 46-4567, 47-4546

Can anyone help ... or lead me in a direction?

May 2 '07 #2
If your system is normalized (and it sounds like it might be - has a
one-to-many query) then the actual data would look like this for each
stock order in the Detail Data table

StockCode Purchase Orders
0123456789 45-1234
0123456789 46-4567
0123456789 47-4546

In order to get it into this form

StockCode Purchase Orders
0123456789 45-1234, 46-4567, 47-4546

you need to use a Crosstab query - which would actually make it look
like this:

StockCode Order1 Order2 Order3
0123456789 45-1234 46-4567 47-4546

You can read about crosstab queries in Access help.


Rich

*** Sent via Developersdex http://www.developersdex.com ***
May 3 '07 #3
On May 2, 6:56 pm, Rich P <rpng...@aol.co mwrote:
If your system is normalized (and it sounds like it might be - has a
one-to-many query) then the actual data would look like this for each
stock order in the Detail Data table

StockCode Purchase Orders
0123456789 45-1234
0123456789 46-4567
0123456789 47-4546

In order to get it into this form

StockCode Purchase Orders
0123456789 45-1234, 46-4567, 47-4546

you need to use a Crosstab query - which would actually make it look
like this:

StockCode Order1 Order2 Order3
0123456789 45-1234 46-4567 47-4546

You can read about crosstab queries in Access help.

Rich

*** Sent via Developersdexht tp://www.developersd ex.com***
Well yes ... and normally that would probably be ok .... except for
the fact that there are 100's of PO's ... and that will exceed the
column limit, I'm sure.
Perhaps I can rewrite my other query's to request only one record at a
time instead of running a crosstab for all of them at the same time.

May 3 '07 #4
On May 2, 3:22 pm, walt...@gmail.c om wrote:
I have been trying and looking for a few days to a solution into a
query

I am looking up one stock code from a table containing multiple
outstanding purchase orders for that one item.

The problem comes in that I'd like to display all those PO numbers in
one cell.

Example:

StockCode Purchase Orders
0123456789 45-1234, 46-4567, 47-4546

Can anyone help ... or lead me in a direction?
That worked fantastic!!
Thanks

May 3 '07 #5
Glad to hear it! But what worked?

Cheers,
Jason Lepack

On May 3, 11:35 am, walt...@gmail.c om wrote:
On May 2, 3:22 pm, walt...@gmail.c om wrote:
I have been trying and looking for a few days to a solution into a
query
I am looking up one stock code from a table containing multiple
outstanding purchase orders for that one item.
The problem comes in that I'd like to display all those PO numbers in
one cell.
Example:
StockCode Purchase Orders
0123456789 45-1234, 46-4567, 47-4546
Can anyone help ... or lead me in a direction?

That worked fantastic!!
Thanks

May 3 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11363
by: Terrence Brannon | last post by:
I don't know what Postgres considers a relation and had no intention of creating one when piping my schema to it... I always DROP TABLE before CREATE TABLE, so here are the ERRORS emitted when building the database: 3:ERROR: table "country" does not exist 6:ERROR: table "customer" does not exist 11:ERROR: table "product" does not exist 15:ERROR: table "license" does not exist 19:ERROR: table "enduser" does not exist 24:ERROR: ...
7
16853
by: simon | last post by:
Hi I know this has been done to death....but obviously at some point in the dim and distant past! I wish to program a retail database for my shop, I have trawled many forums and I only manage to see "search for inventory, this has been done many times before...", without ever actually coming across the method ;( Could some kind person just give an overview of the 'correct' way to achieve this please?
3
4436
by: Merlin | last post by:
Hi Group Anybody know where I could find a Example of a simple stock control system? Many Thanks Merlin
1
1486
by: Ingrid | last post by:
To help explain my question, I have illustrated the table relationships and listed the fields in each table. Usually the Order Details table has the most records in a database due to one to many relationships. However, I need to be able to extend on the Order Details table with many records on the Order Components table. Table Relationships Components -- Product Break Down -- Products \
4
3075
by: peter | last post by:
In the sample northwind database when an order is sent the sent value come of the instock value. I can not work out how they have done this . I can see that it is an eventprocedure but can not understand it or relate it to my data base. I want to be able to say that some thing has been shipped in a sales table and deduct the value from the instock value in my products table.
2
3376
by: Hank | last post by:
Hello, Does anyone have a formula for calculating the number of days a stock was owned? Of course its real easy if you buy 100 shares on April 1 and sell 100 shares on July 1 but what about multiple buys and sells of different number of shares. As an example: Buy 100 April 1, Buy 200 May 1, Sell 50 June 1, Sell 250 July 1. For tax purposes we need to know the average number of days the stock was held. In the calculation, I believe...
1
5984
by: dan | last post by:
Hi I am trying to create a database for a shop with a barcode reader the problem I have is more than likely a simple one but cant get my head around it. the question is how do I create a form that says how many items I have in stock but will will reduce it when I take one out automatically for example I have 6 computers I sell one so I want it to say I have 5 left.
2
1594
by: etep | last post by:
In my effort to create an order management database, I have established a one to many relation between my tables orders and order details. Tables: Orders: Customer, shipping method, etc. Primary key: OrderIndex Order details: A list of products on this order. Primary key: DetailIndex Relation: OrderIndex occurs once in "Orders", but many times in "Order details" My problem:
40
7972
by: sazd1 | last post by:
Hi Student2 I am working on similar kind of thing for stock calculation but could not find any solution to my problem even after putting my problem to different forums. I saw your post that you have solved this problem of stock calculation. i need help for that too. I am using vb express and MsAccess as database. I am trying to write a query for the calculation of Stock. My tables are as under: PurchaseTable(PTId, PDate,ItemId,...
0
8352
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.