Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data From Two Tables
Message
 
 
À
10/01/2014 15:48:05
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 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01591674
Message ID:
01591681
Vues:
54
>This almost works. However, the complete list has 15 items. My list 'SDE' has 13 items(1-13). But the compiled list does not show item 14, it skips it.
>
>
>
>testconnString = "select T.recseq, T.descriptn, case when UA.menuindex IS NULL then '' else 'Active' end as Flag" +;
>" from webprddt1.wqmsmnulst T LEFT JOIN webprddt1.wqmsmnuprf UA ON T.recseq = UA.menuindex" +;
>" Where userid = 'SDE' Or userid Is Null Order By 1"
>
>
Which table the UserID column belongs to?

Move that condition into AND clause, e.g.
select T.recseq, T.descriptn, case when UA.menuindex IS NULL then '' else 'Active' end as Flag" +;
>" from webprddt1.wqmsmnulst T LEFT JOIN webprddt1.wqmsmnuprf UA ON T.recseq = UA.menuindex" +;
>" AND UA.userid = 'SDE' Order By T.RecSeq"
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform