ONE Record per Client

G

Guest

I currently have multiple records per client in a table and would like to
reduce it to ONE record per client in the table. However, I would like to
capture the information from each of the records when reducing to one record.

For example:
Client No |Account_No|Deposit | etc
75 1000 700
75 2000 200

I would like it to be:
Client No|Account No_a||Account No_b| Deposit_a| Deposit_b|
75 1000 2000 700 200

Is there a way to do that?

Many thanks,
Dina
 
A

Amy Blankenship

Dina said:
I currently have multiple records per client in a table and would like to
reduce it to ONE record per client in the table. However, I would like to
capture the information from each of the records when reducing to one
record.

For example:
Client No |Account_No|Deposit | etc
75 1000 700
75 2000 200

I would like it to be:
Client No|Account No_a||Account No_b| Deposit_a| Deposit_b|
75 1000 2000 700 200

What you want is called "denormalizing" and is actually the reverse of what
you want to do when designing tables in a database.

But, no, you can't do that because what if there are twenty transactions for
a client. What are you going to do, make 40 columns?
 
G

Guest

Thanks Amy!

Amy Blankenship said:
What you want is called "denormalizing" and is actually the reverse of what
you want to do when designing tables in a database.

But, no, you can't do that because what if there are twenty transactions for
a client. What are you going to do, make 40 columns?
 
D

David Cox

Do you actually want this in a table, or just to be able to see it on a
screen, i.e. as the output of a query?

If it is the latter then you can create a query to add a sequence number to
each account/deposit record, and create a crosstab query with the sequence
number as the column heading. You concatenate the output formatted fields as
a string for the value item.

Being able to do this does not make it a good idea, unless, of course, it
comes from the boss..
 
G

Guest

Hi David,

Thanks for your reply - the reason I need to do this is b/c I need to export
to a statistical package & need all info per client in one entry.
I understand your solution but not sure about one thing - how do I insert
sequence numbers PER account?

Thanks again.
 

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