Tricky query

V

Vincdc

Hello:
I have some data like the following
ID Fname LName DOB Address
1 Smith John July 1, 1960 2345 Main Street,
1 Smith John July 1, 1960 New York

I would like to have a query to combine the two lines into one line, e.g.
combine the address, so it will look like
ID Fname LName DOB Address
1 Smith John July 1, 1960 2345 Main Street, New York

Any suggestion will be appreciated!

Vincent
 
K

KARL DEWEY

Add an Autonumber field to your table. Review the data to make sure that
there is a second records for every first record. When checking each first
record will be odd numbered in the autonumber field.
Then run the query AFTER YOU BACKUP table.
UPDATE Vincdc INNER JOIN Vincdc AS Vincdc_1 ON (Vincdc.LName =
Vincdc_1.LName) AND (Vincdc.Fname = Vincdc_1.Fname) AND (Vincdc.ID =
Vincdc_1.ID) SET Vincdc.Address = [Vincdc].[Address] & " " &
[Vincdc_1].[Address]
WHERE ((([Vincdc_1].[AutoID]-1)=[Vincdc].[AutoID]));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top