Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difficulty writing SQL Statement
Message
From
08/01/2009 12:23:50
 
 
To
07/01/2009 21:11:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01371924
Message ID:
01372119
Views:
20
>That finds the rules for a user with both group and individual rules fine, but it finds too many rules for a user NOT in a group, since their cgroupid is 'ZZZZZZ'.

If I've got this correct.......

A user who does not belong to a group has a group id of ZZZZZZ
Rules which pertain only to individuals have a group id of ZZZZZZ

so you can't match on the user's groupid because it finds the rules that don't belong to a group.


Is it possible to change the "no group" group id in either table so that you don't get this match? Otherwise, you can add a
AND cgroupid <> "ZZZZZZ"
to the part of the query joining the group records
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform