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

Reorganize MS Access Table

I have a table of the structure below:

Delivery Product
101 A
101 B
101 C
102 A
102 E
103 C
104 A
104 E
104 C

You may see that a delivery can have multiple products. I will like to
reorganize the table to look like this:

Delivery Product1 Product2 Product3
101 A B C
102 A E -
103 C - -
104 A E C

So that there is only one line of record for each delivery. I will
greatly appreciate if someone can show me a way (query, etc) to
organize the table into this form. Please not each delivey may have a
different number of products.

Thanks.

Nov 28 '05 #1
7 2212
Don't

With the design you have you may associate any number of Products with
any Delivery independently of (unneeded) fields Product1, Product2 etc.
With your proposed design you will be limited by the number of these
fields that you decide to create; worse still you will not be able to
summarize and organize your data.

What you are suggesting is not consistent with good db design,
normalization, efficiency, effectiveness or even Santa Claus.

You have good design. Be Happy! Stick with it.

Nov 28 '05 #2
Seth wrote:
You may see that a delivery can have multiple products. I will like to
reorganize the table to look like this:

Delivery Product1 Product2 Product3
101 A B C
102 A E -
103 C - -
104 A E C

So that there is only one line of record for each delivery. I will
greatly appreciate if someone can show me a way (query, etc) to
organize the table into this form. Please not each delivey may have a
different number of products.


Seth, you do NOT ever want to make your table this way. If you do,
forget Access and any other database application forever and use Excel
for the rest of your life.

Now, on the other hand, if you wish to display data in a format you
mention above, you will need to look into making a crosstab query. Look
up help on this topic and see if that will satisfy your needs.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 28 '05 #3
Thank you Tim for the quick response. Yes, I won't change the original
table. What I need is to create a query that will display the data in
the second format. I will check crosstab query if that helps. Thanks
again.

Nov 28 '05 #4
Thanks Lyle,
Thank you for the quick response. I won't change the original table.
What I meant was to create a query that will display the data in the
second format. I will appreciate any suggestion on that. Thanks again.

Nov 28 '05 #5
Seth wrote:
I will check crosstab query if that helps. Thanks
again.


Write back if you need any clarification on cross-tabs. I don't use
them very often, but many others here on cdma will be able to help you.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 28 '05 #6
I have tried the crosstab; it doesn't give me exactly what I want - it
lists all the products for column headings (about 760) in this case. So
I will have more than 780 column headings. I need a way to update a new
table so that it looks like the 2nd table shown above: the column
headings are already there, so the query grabs the the products for a
delivery and puts them under a column heading (doesn't matter under
which field as far as it is associatedwith the appropriate delivery).
Thanks for your help guys.

Nov 28 '05 #7
"Seth" <se***********@gmail.com> wrote in
news:11**********************@z14g2000cwz.googlegr oups.com:
I have tried the crosstab; it doesn't give me exactly what I
want - it lists all the products for column headings (about
760) in this case. So I will have more than 780 column
headings. I need a way to update a new table so that it looks
like the 2nd table shown above: the column headings are
already there, so the query grabs the the products for a
delivery and puts them under a column heading (doesn't matter
under which field as far as it is associatedwith the
appropriate delivery). Thanks for your help guys.

Find the Fconcatfld() function at http://www.mvps.org/access/
http://www.mvps.org/access/modules/mdl0008.htm

may do exactly what you want, or at least give pointers on how to
roll your own function.

--
Bob Quintal

PA is y I've altered my email address.
Nov 29 '05 #8

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

Similar topics

1
by: Raziq Shekha | last post by:
Hello all, SQL 2000 on Windows 2000. If I go into all tasks, maintenance plan, it gives me an option to reorganize data and index pages. When I check on it, it populates the line "change free...
1
by: mark4asp | last post by:
Hello, I have an eBook which I need to create a CHM version for. It contains hundreds of HTML files. Can anyone recommend a HTML authoring tool which will allow me to create new directories...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
7
by: Ruben Baumann | last post by:
Just wondered if anyone has had occasion to use, or does use, FileMaker, or Raining Data's Omnis, or Alpha5's software, and how they compare with Access? Ruben
24
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> ...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
0
by: Tony Hine | last post by:
Problem for Excel Developers One of the problems facing Excel developers moving into MS Access is actually the apparent similarity between MS Access tables and Excel spreadsheets. MS Access is...
10
by: Les Desser | last post by:
In article <fcebdacd-2bd8-4d07-93a8-8b69d3452f3e@s50g2000hsb.googlegroups.com>, The Frog <Mr.Frog.to.you@googlemail.comMon, 14 Apr 2008 00:45:10 writes Thank you for that. It was very...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.