Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT using Multiple Join Conditions
Message
De
16/03/2006 10:59:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/03/2006 10:26:33
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01104883
Message ID:
01104898
Vues:
16
>I have this SPT string that works as long as the drawmext3 table has only one match to the drawmstrp table:
>
>getDrawingDataString = "Select * From drawmstrp Left Outer Join drawmext1 On drawmstrp.dm_drawing_number = drawmext1.dmdrawno Left Outer Join drawmext3 On drawmstrp.dm_drawing_number = drawmext3.dmdrawno Where drawmstrp.dmdrawno = '" + PadR(whatDrawingNumber,12) + "'"
>
>drawmstrp = header data of Engineering Drawing Numbers
>drawmext3 = detail changes of drawmstrp
>
>However, if drawmext3 has several records that match the drawmstrp my SPT will pull the first record data.
>
>How can I have the ON(join condition) look at more than one field to match on and at the same time still pull from the drawmstrp table if no matches are found?

Logical operators are supported in Select-SQL (ie: AND).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform