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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monster of an SQL Puzzle

Status
Not open for further replies.

Mayoor

Programmer
Jan 16, 2004
198
GB
In my database of applicants I have the following fields.

Ethnicity(ethnicity1, ethnicity2 e.t.c), Gender(Male or Female) and Location (County1, County2 County 3 e.t.c)

I need to organise my query so that the data is produced in the following format

Ethnicity 1 Ethnicity 2 Ethnicity 3
Male Female Male Female Male Female
Location 1 2 3 4 5 6 7
Location 2 5 5 6 8 5 2
Location 3 3 3 3 3 3 6
Location 4
.
.
.

Can anyone help me with this monster of a SQL Puzzle
 
Why can't you just group the data and then sort out the display formatting in whatever application is used to view it?
 
The layout of your desired result set is of a multidimensional result set, which is what olap is for. However you may be able to get close using the cube operator.

"Shoot Me! Shoot Me NOW!!!"
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top