By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Combine 2 records in one

P: 3
I need to know urgently how to combine 2 records in 1.
Aug 31 '06 #1
Share this Question
Share on Google+
6 Replies


PEB
Expert 100+
P: 1,418
PEB
How do you want to combine 2 records in 1? Can you give us an exemple?
Sep 1 '06 #2

P: 3
How do you want to combine 2 records in 1? Can you give us an exemple?
Record # | LastName | FirstName | Address
-------------------------------------------------------------------------------
1 | Visco | John | Empty
2 | Empty | Empty | 101 Blvd

The address "101 Blvd" should go into field addess. Can You help?
Sep 1 '06 #3

PEB
Expert 100+
P: 1,418
PEB
Ok I understand what is your problem!
In your table unfortunatelly I don't see any way to associate the information of the two rows!

If you have had a simmilar ID in the two records you could proceed to do an aggregate SELCT query and as a result your information should be stored in the same record.

What kind of result do you want?

Change the records in the table doing from 2 records 1

OR

Visualize the information together in a query ?

IN the 2 cases you need a common ID to associate the information that have to be placed!

I suppose that your case is the first one!

And you want to correct the information in your tables!

I imagine that you have a common ID in your rows

So it's better to add a field in your table from type true/ false or Yes / No

After done that you create an Update query and fill this field for all records with value false No

Than you create an Append query in wich you group your information in conformity with this common ID for the records and you mark the field of type Yes/No as Yes

The next step is to execute a Delete query on all records that the field Yes/ No is no If the results with Yes are suitable for you!

I hope that this'll help! And if you don't know how to create a step from here, or other problem write us!

Have a nice day!
Sep 2 '06 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
My suggestion would be to export the data to a csv file. You could then read the file in as a comma delimited text file. Opening a recordset of your new table and adding a new record by taking line 1 and line 2 in and putting them into one local string before reading the appropriate positions in the string as part of the AddNew action on the recordset.


Record # | LastName | FirstName | Address
-------------------------------------------------------------------------------
1 | Visco | John | Empty
2 | Empty | Empty | 101 Blvd

The address "101 Blvd" should go into field addess. Can You help?
Sep 2 '06 #5

P: 1
Record # | LastName | FirstName | Address
-------------------------------------------------------------------------------
1 | Visco | John | Empty
2 | Empty | Empty | 101 Blvd

The address "101 Blvd" should go into field addess. Can You help?
I encountered the same problem with you too. How do you resolve your problem. Appreciate sharing.
Nov 7 '06 #6

NeoPa
Expert Mod 15k+
P: 31,492
If you have data from two records that you want merged, how do you determine which records should be joined in this way?
This seems to be the crux of the matter.
If you have an identifier in a field which links the relevant records together then there are ways of merging the data - however, that is a prerequisite.
Nov 7 '06 #7

Post your reply

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