Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL inner join query challenge
Message
 
 
À
10/11/2009 11:45:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
01434050
Message ID:
01434067
Vues:
32
My message Re: SQL inner join query challenge Thread #1434050 Message #1434065 is the same as Sergey's - of course, I didn't see his reply when writing my message.

>I think I see where you were going with the code you provided. I'll keep working in that direction to see if I can get to where I need.
>
> I've included my clarifications for Sergey here below in a better format.
>
>
>Packageid refers to the option.optionid of the parent. I realize now I confused things. It's not a self join.
>
>option.optionid = modeloption.packageid for the contents of a package
>
> So a package with 3 records would look like this basically...
>
>
>
>     Modelid     Optionid     Packageid
>
>         180              10              100
>         180              20              100
>         180              30              100
>
>option.optionid = modeloption.optionid for the parent of the package
>
>         180            100                  0   (0 or null would indicate a parent record)
>
>
>The result set I want would be:
>
>      Modelid     Option.name                                       Optionpackage.name
>      --------------   ----------------------------------------                 ---------------------------------------------
>         180        Option.name for optionid=10                 Option.name for optionid=100
>         180        Option.name for optionid=20                 Option.name for optionid=100
>         180        Option.name for optionid=30                 Option.name for optionid=100
>
>
>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform