About using the database to get informations.

S

Stefano

Hi everybody,
I have a question about how to do a simple
operation. I have a table with data classified by
requests, every record is a single request my company got.
Now I would just like to have a table, or a dataset, with
just the customers list, so that if a single customer made
us different requests all the duplicated are eliminated
and I just have a sheet with customer's name, address,
contacts and so on, without useless repetitions. Thanks
 
M

mark

Probably the easiest thing to do would be to create a new
table for your customer info, including a unique
customerID. Then add the customerID field to the request
table as a foreign key to the customer table.
 
S

Steve Coombes

Hi Stefano -

Create a query to retrieve the data from that table that you want. While in
the query's design view, open the query properties (right-click in an open
grey area of the upper pane and choose Properties...). Change the Unique
Values property to Yes. Now only one record per customer should appear. (The
equivalent SQL syntax is to add the keyword DISTINCT directly after your
SELECT keyword.)

A BIG CAVEAT:
If you are storing your customer info along with each request, and some of
the customer info varies from record to record, each record that differs
will be listed separately. This will require either data cleanup, or
preferably normalization of your tables which is a much bigger topic than
this message.
 

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

Similar Threads

Query, joint table, or ? 2
best way to save time 2
New Database 4
New Database 5
Informations about WinXPe 1
Britain's most complained about broadband providers. 6
Database Design 2
Database design 2

Top