473,388 Members | 1,383 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.

How to put 2 or more fields inside 1 field for not repeating the line?

Hi,

I work on construction site and have two different tables. One which shows the material identification code and the quantity required on the jobsite. Another table with the shipment numbers. Many times the material comes in more than one shipment, which has different numbers. The first table has only one line to each identification code and the total qty required. When I link to the second table it repeats the line because there is more than 1 shipment. I would like to know if it is possible to have all the shipments in the same field, so it will avoid repeating the lines;

Example:

1st table

Ident Code DESCRIPTION REQUIRED QTY
C5NZPU 16" PIPE 500
C5NZP6 12" PIPE 275

2nd table

Ident Code Shipment_# Ship Qty
C5NZPU NZ1566 100
C5NZPU NZ1899 200
C5NZPU NZ2001 200
C5NZP6 NZ1852 175
C5NZP6 NC1945 100

The result is:

Ident Code DESCRIPTION REQ. QTY Shipment_# Ship Qty
C5NZPU 16" PIPE 500 NZ1566 100
C5NZPU 16" PIPE 500 NZ1899 200
C5NZPU 16" PIPE 500 NZ2001 200
C5NZP6 12" PIPE 500 NZ1852 175
C5NZP6 12" PIPE 500 NZ1945 100

I want it to be:

C5NZPU 16" PIPE 500 NZ1566/NZ1899/NZ2001 500
C5NZP6 12' PIPE 275 NZ1852/NZ1945 275

Does anyone know how I can get it?

I appreciate very much.

Guilherme
Aug 10 '10 #1
1 1149
Delerna
1,134 Expert 1GB
SQL provides numerous aggregate functions.

Sum(),Avg(),Min(),Max() etc

unfortunately there is no Concatenate() in access as far as I am aware
That would make this task all too easy ;)

There are many ways you can fudge it and my way is to do it in my front end, which these days, for me, are web pages. I don't think that will suit you though and my memory is a bit fuzzy how to do it in access

It is relatively easy if the number of records is fixed but it gets complicated where you need to concatenate a variable number of fields which you appear to need.

Someone has recently posted a function to do this but I think it may have been a function for SQL Server and not access.

If I find the other post I will post a link
or if I find a sample in an old database I will post that.

If someone else beats me with an answer for you then ...good.
Aug 10 '10 #2

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

Similar topics

2
by: Sky | last post by:
Hello: Another question about trying to wring functionality from a DataGrid... Have a DB table of "Contacts" -- 14 or more fields per record Show in datagrid -- but only 5 columns (First,Last,...
2
by: mimi | last post by:
Is there a way to set hyperlink's datatextfield bind to more than one field for ex: <asp:HyperLinkColumn DataNavigateUrlField="CustomerID" DataNavigateUrlFormatString="Customer.aspx?ID={0}"...
2
by: gaffar | last post by:
Hello Sir, How to assign more than one primary key to table by this below following code. i am able assign to a single field only. how to assign primary key to more than one field. the primary key...
1
by: ReidarT | last post by:
How can I show more than one field in a combobox? regards reidarT
5
by: johnny | last post by:
hi all, I wonder if I could do the following task in PHP before searching for javascript which I prefer not to have in my code: I have a form to create new tables in a database and, since I...
7
by: Chuck Anderson | last post by:
I'm pretty much a JavaScript novice. I'm good at learning by example and changing those examples to suit my needs. That said .... ..... I have some select fields in a form I created for a...
4
by: Stan | last post by:
I am running in ACCESS 2003 a database with a single table. It records service rendered to clients of a food pantry. As each client is served the date is entered into 1-6 fields SvcDate1,...
3
by: myemail.an | last post by:
If I need to format how the content of a field is displayed, I can click ALT + ENTER from design view, and specify the format, for example, the number of decimal digits and so on. Is there a way...
7
by: billa856 | last post by:
Hi, My Project is in MS Access 2002. Now I want to know that can I add more field to table.Its maximum capacity is 255 fields.But I want to add 10 more fields to that table.Is this thing possible?...
3
OuTCasT
by: OuTCasT | last post by:
How does one make a field in a crystal report Multi Line ??? I have 2 fields next to each other for example : Problem Solution...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.