Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help needed with sql query!

Status
Not open for further replies.

tetorvik

Programmer
Sep 6, 2001
13
0
0
FI
Hi!
I’m having a problem with a SQL query. I have two database tables Customer and CustomerClassification.

Customer table contains information like name, address, phone etc.

CustomerClassification contains other information about the customer like hobbies and other interests. One Customer may have several rows in CustomerClassification!

I would like to select customer information with his/her classification(s) within a single query and i would like to receive only one row for each customer. The last column (Classification) should contain all the classifications for the customer.

The result should look like:


CustomerName Address Phone Classification

Row1: Abrahamson, Arne Street1 13456 Baseball
Golf Pizza

Row2: Abrahamson, Berit Street1 12456 Comedies
Meet balls


Is this possible? Any ideas?
Thanks in advance!
 
Correction:

Baseball, golf and pizza are row1 classifications and Comedies and meet balls are row2 classification.
 

My reply in thread220-155580 should give you an idea how to create a cross-tab query in SQL. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top