Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to achieve a complex SQL
Message
From
23/07/2006 20:49:11
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01139004
Message ID:
01139018
Views:
16
>Try,
>
>SELECT menu.* FROM menu  ;
>	JOIN MenuOptions mo ON mo.NoMenu = menu.NoMenu AND mo.Enabled ;
>UNION ;
>SELECT menu.* FROM menu  ;
>	JOIN MenuPriviledge mp ON mp.NoMenu = menu.NoMenu AND mp.notype = lnNotype ;	
>	LEFT JOIN MenuOptions mo ON mo.NoMenu = menu.NoMenu  ;
>	WHERE mo.Enabled IS NULL
>
It is amazing to see how you can view this so simply. It never occured to me to make use of the null approach to resolve this issue. Thanks a lot, this is exactly what I was looking for.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform