Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using self-join to merge rows into same column
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Using self-join to merge rows into same column
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01239953
Message ID:
01239953
Vues:
52
I have a cursor with 3 fields order_key, lup_type, lup_value.
The data might look as follows:
531 make FORD
531 color BLUE
532 make HONDA
532 color RED
533 color ORANGE (person didn't enter a car make)
534...etc.

These values were already retrieved from a vehicle_info table and a lookup table.

How can I take these values and combine them so that it will have the following layout:

order_key, veh_make, veh_color
531, FORD, BLUE
532, HONDA, RED
533, , ORANGE

I tried a self join but can't get the list to show unique order_key's.

As always, thanks for your excellent help.

Marcel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform