View previous topic :: View next topic |
Author |
Message |
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Fri Aug 20, 2010 9:56 am Post subject: display key's associated columns horizontally |
|
|
Here's what I'm trying to do:
I have columns :
Code: | BASKET FRUIT
-------- -----
BASKET#1 APPLE
BASKET#1 BANANA
BASKET#1 ORANGE
BASKET#2 PINEAPPLE
BASKET#2 BANANA
BASKET#2 ORANGE
BASKET#3 APPLE
BASKET#3 PEACH
BASKET#3 BANANA |
How can I do a query :
SELECT BASKET,
FRUIT
WHERE FRUIT = 'BANANA'
and have ALL of the fruits associated with that basket
displayed across the line, not just show the fruit if it's a BANANA ?
i.e. this:
Code: | BASKET#1 APPLE BANANA ORANGE
BASKET#2 PINEAPPLE BANANA ORANGE
BASKET#3 APPLE PEACH BANANA
Not:
BASKET#1 BANANA
BASKET#2 BANANA
BASKET#3 BANANA |
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri Aug 20, 2010 10:37 am Post subject: |
|
|
tcurrier,
What is the max length(column definition) and max occurrence for BASKET and Banana?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Fri Aug 20, 2010 1:04 pm Post subject: |
|
|
Kolusu,
Basket is the key field.... So the number of occurrences of 'Basket' would
depend on the number of occurrences of 'Fruit'. 'Basket's maximum field length is 10.
'Fruit' can occur 15 times per 'Basket' ... Its maximum field length is 10 also...
Thanks. |
|
Back to top |
|
|
|
|