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

Consolidating records in a table

P: n/a
Hello people,

I have some records in a table that have common values for ex:

FNAME LNAME SSN EE
CH SP
John Smith 1234567 20000
John Smith 1234567
10000
Jane Doe 987654 15000
Jane Doe
987654 5000

How do I make a query that merges the records to:
FNAME LNAME SSN EE CH SP
John Smith 1234567 20000 10000
Jane Doe 987654 15000
5000

I will appreciate any help, Thanks.
Feb 13 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Feb 13, 12:21*pm, ravxm <rav...@gmail.comwrote:
Hello people,

I have some records in a table that have common values for ex:

FNAME * * * *LNAME * * * * *SSN * * * * * * * EE
CH * * * * * * * *SP
John * * * * * *Smith * * * * * 1234567 * * * * * 20000
John * * * * * *Smith * * * * * 1234567
10000
Jane * * * * * *Doe * * * * * * *987654 * * * * * *15000
Jane * * * * * *Doe
987654 * * * * * * * * * * * * * * * * ** * * * * * * * * 5000

How do I make a query that merges the records to:
FNAME * * * * *LNAME * * * * *SSN * * * *EE * * * * CH * * * * SP
John * * * * * * * Smith * * * * * *1234567 * 20000 *10000
Jane * * * * * * * Doe * * * * * * * *987654* 15000
5000

I will appreciate any help, Thanks.
Somehow when I submitted the post the text went all crazy. What I
basically want is to consolidate the records for the same person with
some null values into one record without null values. Also, CH and SP
below FNAME and LNAME are columns. The 5000 below Jane was supposed to
be under the SP column.
Feb 13 '08 #2

P: n/a
You'll need a more specific and precise definition of how you want to
consolidate records. If all but one of the fields will be null, and there
will never be two records with data in the same field, it would be
simpler -- but experience tells me that isn't always going to be the case.

Larry Linson
Microsoft Office Access MVP
"ravxm" <ra****@gmail.comwrote in message
news:d9**********************************@y5g2000h sf.googlegroups.com...
On Feb 13, 12:21 pm, ravxm <rav...@gmail.comwrote:
Hello people,

I have some records in a table that have common values for ex:

FNAME LNAME SSN EE
CH SP
John Smith 1234567 20000
John Smith 1234567
10000
Jane Doe 987654 15000
Jane Doe
987654 5000

How do I make a query that merges the records to:
FNAME LNAME SSN EE CH SP
John Smith 1234567 20000 10000
Jane Doe 987654 15000
5000

I will appreciate any help, Thanks.
Somehow when I submitted the post the text went all crazy. What I
basically want is to consolidate the records for the same person with
some null values into one record without null values. Also, CH and SP
below FNAME and LNAME are columns. The 5000 below Jane was supposed to
be under the SP column.
Feb 14 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.