Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data From Two Tables
Message
 
 
To
10/01/2014 15:13:22
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:
01591677
Views:
48
>I have a table that have a complete list of menu options. I have another table that has a list of active menu options that a user has turned on.
>
>I need an sql that will combine these two to show the complete list and flag the records that the user has selected.
select T.MenuOption, case when UA.MenuID IS NULL then '' else 'Active' end as Flag
from CompleteList T LEFT JOIN UserActiveList UA ON T.MenuID = UA.MenuID
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