473,490 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combining records

I have a database table like the following:

id|name|item_id|sequence

and the following instance data:

1|Apple|419841|1
2|Orange|419841|2
3|Banana|935890|1
4|Lime|959081|1

I need to create a new table where all rows that have the same item_id
(Apple and Orange) are combined.

So the output I need would be :

1|Apple AND Orange|419841|1
3|Banana|935890|1
4|Lime|959081|1

Thank you in advance!

Mike

Nov 13 '05 #1
4 1946
Combining records with the same Item_Id in a table is the wrong thing to do.
Leave it as it is and combine the records in a query where you need them
combined.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"mike" <ru****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a database table like the following:

id|name|item_id|sequence

and the following instance data:

1|Apple|419841|1
2|Orange|419841|2
3|Banana|935890|1
4|Lime|959081|1

I need to create a new table where all rows that have the same item_id
(Apple and Orange) are combined.

So the output I need would be :

1|Apple AND Orange|419841|1
3|Banana|935890|1
4|Lime|959081|1

Thank you in advance!

Mike

Nov 13 '05 #2
PC Datasheet, thanks for the advice. However, that is precisely what I
am trying to do. I was mistaken to say "I need to create a new table".
I should have said, "I need to create a SQL query in Access 2003
where..."

Thanks!

Mike

Nov 13 '05 #3
I am still in need of solution to this problem. Is there more
information that I could provide to make this easier?
Thank you very much!

Mike

Nov 13 '05 #4
mike wrote:
I have a database table like the following:

id|name|item_id|sequence

and the following instance data:

1|Apple|419841|1
2|Orange|419841|2
3|Banana|935890|1
4|Lime|959081|1

I need to create a new table where all rows that have the same item_id
(Apple and Orange) are combined.

So the output I need would be :

1|Apple AND Orange|419841|1
3|Banana|935890|1
4|Lime|959081|1


search keyword: query concatenation.

http://www.mvps.org/access/modules/mdl0008.htm might help, too.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #5

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

Similar topics

8
8334
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though...
1
2151
by: Heather | last post by:
I know this is a painful question and I have searched the group for past responses and none of the responses seem to cover my specific need. We have a table that contains fields like ID, Yr,...
4
11515
by: Tony Williams | last post by:
I want to combine two tables into one. I have a table with all the field definitions from two other tables. I now need to update this new table with the data from the other two tables.However both...
1
2042
by: ferraro.joseph | last post by:
Hi, I'm querying Salesforce.com via their AJAX toolkit and outputting query results into a table. Currently, their toolkit does not possess the ability to do table joins via their structured...
1
1868
by: Macbane | last post by:
Hi, I really hope you can help. I have a databse which records interventions in patients drug therapy. Each record in the main table contains 3 fields to capture the 3 main drug names involved...
3
1794
by: jde357 | last post by:
I have MS SQL data that I'm ODBC querring into Access to allow some simple reporting to be done on the data. That data is event driven, so I get records that the particular event is concurrent. ...
2
2585
by: rdraider | last post by:
Using SQL 2000, how can you combine multiple records into 1? The source data is varchar(255), the destination will be text. I need help with the select statement. example tables: CREATE TABLE ...
3
2820
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
1
1617
by: dlee360 | last post by:
Hello! So I've been trying to figure out how to do the following in T-SQL: Orig Table: Col1 Col2 Col3 Set A ...
0
7112
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
6974
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...
1
6852
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...
0
5448
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,...
1
4878
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
4573
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
3084
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
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.