Sorry I am not good at this SQL query stuff but in my AD I am looking for membership in a particular group using memberOf but I am not getting the correct results.
Here is the sql statement I am running:
SELECT displayName FROM OU=Users,OU=TEST,DC=electric,DC=net WHERE memberOf NOT 'CN=zz%All TEST,OU=Groups,OU=TEST,DC=electric,DC=net'