If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Req Help with Crosstab query
Assuming I have 2 tables.
t_sexes sex_ID Sex_Name 1 Male 2 Female and t_names name_ID name_name sex_id 1 jon 1 2 jason 1 3 Sue 2 4 Bill 1 5 Sally 2 How can I have my results show like this. Male Jon,Jason,Bill Female Sue,Sally I have limited experience with pivot tables but I assume this is the way to go......thanks in advance for ahy help. -- ------------------------------------------------------ "A comet is, of course, frozen bodies of ice and dust formed over 4.6 billion years ago---or created 6,000 years ago, depending on whether or not you're wrong." ---Jon Stewart |
#2
|
|||
|
|||
Req Help with Crosstab query
first reaction: Why not Sex "M" or "F" ? - but that aside ...
What is going to be your column heading? It is going to have to be the same for Jon and Sue, and for Jason and Sally, if you want those names in the same column as in your example. My guess is that you do not have a candidate for column variable. If so one way to solve this would be to allocate a sequence number starting at 1 for every male, and a similar sequence number starting at 1 for every female and use those numbers as the column heading. You can then get that layout with a crosstab query with Sex as the row variable, sequence as the column variable, and name as the value variable. "pottymouthed" wrote in message oups.com... Assuming I have 2 tables. t_sexes sex_ID Sex_Name 1 Male 2 Female and t_names name_ID name_name sex_id 1 jon 1 2 jason 1 3 Sue 2 4 Bill 1 5 Sally 2 How can I have my results show like this. Male Jon,Jason,Bill Female Sue,Sally I have limited experience with pivot tables but I assume this is the way to go......thanks in advance for ahy help. -- ------------------------------------------------------ "A comet is, of course, frozen bodies of ice and dust formed over 4.6 billion years ago---or created 6,000 years ago, depending on whether or not you're wrong." ---Jon Stewart |
Thread Tools | |
Display Modes | |
|
|