473,395 Members | 1,678 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,395 software developers and data experts.

Combine Records(ROWS) together in Access

ryanvmcgee
Hello,
I am fairly new at doing advanced databases outside of excel.

I am trying to combine records in a database I will be using, none of the, CONCAT Queries or scripts I have found seem to work quite right.

What I need is something to combine records like this:

ID Machine
AAG99999 CANON 225
ADL900221 OLIVETTI F231
ADL900221 OLIVETTI F232

Into this:

ID Machine:
AAG99999 CANON 225
ADL900221 OLIVETTI F231, OLIVETTI F232

I know it seems like it would be pretty simple, but I have yet to figure out how to do it?

Can Anyone Help?
Feb 5 '07 #1
10 19922
I meant to mention that I have already tried a few of the examples given elsewhere on this site and others. I am using access 2000.

Hello,
I am fairly new at doing advanced databases outside of excel.

I am trying to combine records in a database I will be using, none of the, CONCAT Queries or scripts I have found seem to work quite right.

What I need is something to combine records like this:

ID Machine
AAG99999 CANON 225
ADL900221 OLIVETTI F231
ADL900221 OLIVETTI F232

Into this:

ID Machine:
AAG99999 CANON 225
ADL900221 OLIVETTI F231, OLIVETTI F232

I know it seems like it would be pretty simple, but I have yet to figure out how to do it?

Can Anyone Help?
Feb 5 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Hello,
I am fairly new at doing advanced databases outside of excel.

I am trying to combine records in a database I will be using, none of the, CONCAT Queries or scripts I have found seem to work quite right.

What I need is something to combine records like this:

ID Machine
AAG99999 CANON 225
ADL900221 OLIVETTI F231
ADL900221 OLIVETTI F232

Into this:

ID Machine:
AAG99999 CANON 225
ADL900221 OLIVETTI F231, OLIVETTI F232

I know it seems like it would be pretty simple, but I have yet to figure out how to do it?

Can Anyone Help?
Hi Ryan

databases are not designed to work this way. The first example is the correct way of storing this information.

For what purpose do you need the data displaid the other way.

Mary
Feb 5 '07 #3
NeoPa
32,556 Expert Mod 16PB
You'll see from some of my posts in these threads that I'm very much with Mary on that point.
However, if you absolutely do need to do it, there are a couple of threads which deal with this issue.
(Combining Multiple Rows of one Field into One Result) & (Combining Rows-Opposite of Union ).
Feb 6 '07 #4
maxamis4
295 Expert 100+
My only recommendation is to either add a query or do it programmatically through forms. But I don't see the need in this unless you are trying to generate a unique id. For that I have always used vb. If you are intrested I can shoot you a couple ideas. let me know.
Feb 6 '07 #5
Hi Ryan

databases are not designed to work this way. The first example is the correct way of storing this information.

For what purpose do you need the data displaid the other way.

Mary
I need it this way in order to upload products to a website.

I don't think I absolutly have to use access, that is what I know, but I am willing to attempt to learn something else. I have just started to Learn VB.
Feb 7 '07 #6
Neopa,
I read your "Combining Rows-Opposite of Union" Posts.
Any Idea why it would say " Unidentified function Concat in Expression"?
I entered the code into a new module in VB and named it Concat(after changing the field names to the ones in my tables). Concat is showing under my Functions list.

Any Ideas?

You'll see from some of my posts in these threads that I'm very much with Mary on that point.
However, if you absolutely do need to do it, there are a couple of threads which deal with this issue.
(Combining Multiple Rows of one Field into One Result) & (Combining Rows-Opposite of Union ).
Feb 7 '07 #7
I have enclosed five screen-shots of exactly what I typed in the module and in the sql. There is a shot of the error message as well.



Picture 3
Picture 4


You may have to zoom in to see the text
Feb 7 '07 #8
NeoPa
32,556 Expert Mod 16PB
I have enclosed five screen-shots of exactly what I typed in the module and in the sql. There is a shot of the error message as well.
Picture 1
Picture 2
Picture 3
Picture 4
Picture 5

You may have to zoom in to see the text
The only thing I can think of (I checked out your pics and everything seems right) is that you hadn't compiled and saved the new module Concat before testing it. Running from SQL is not the same as invoking it directly - it needs the module to be saved first.
Feb 8 '07 #9
NeoPa
32,556 Expert Mod 16PB
BTW When creating pictures to post - .Jpg is a good format to use, but come out of full screen mode and use Alt-PrintScreen to copy just the current window. This keeps the pictures smaller ;)
Feb 8 '07 #10
NeoPa
32,556 Expert Mod 16PB
Another point to notice :
In your Picture 2 there is a staus in your watch window saying <Can't compile module> - You will need to sort out any compilation errors first of course (Use Alt-D, L to compile the project).
Feb 8 '07 #11

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

Similar topics

3
by: Stephen Matthews | last post by:
Help please i have a file which im importing, however it is a single column, the data looks like C8517673505 N7062175 C8517673516 N7062178 C8517673527
1
by: basithr77 | last post by:
Hi I am trying to display a few records from MS Access but I keep getting an error stating: System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot find the input table or query...
17
by: Lauren Quantrell | last post by:
Using MS Access 2K, I have a client with a number of seperate customer tables for each country, approx 50 tables, stored on a SQL Server backend. I cleaned up the data in the tables and inserted...
1
by: jmarr02s | last post by:
Is it possible to limit the number of Subform records using MS Access 2003? That is, my end users want the capability of entering up to 12 records on their subform. Is that possible? ...
2
by: atiq | last post by:
I am trying to combine forename and surname together in a report so, that there is only a single space between the two. Any help would be much appreciated. hope someone can help me with this problem....
1
by: ktang3227 | last post by:
Hi all, I have a table which list all the different product# and quantity of the product in each row. But for some reason, some of the product splites into 2 rows. For example; Product A has...
10
by: deppeler | last post by:
I am wanting to return the number of records (rows) in a flat file db. My script is a resource kit library and each item has a catalog number ($catnumber), instead of the user having to remember the...
3
by: klbachrodt | last post by:
Hi all - I've been browsing this forum for a while now, looking for help, and finally decided to join and ask my question, since I'm not terribly good at writing SQL queries in Access. Here is my...
3
by: bradleychapin | last post by:
I haven't been able to enter any new records into my access form now that I added a number of hyperlinks to the form. It acts like a read only file now while the base document allows all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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...
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.