Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data From Two Tables
Message
 
 
To
10/01/2014 15:48:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01591674
Message ID:
01591681
Views:
52
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform