×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to combine 2 LDAP queries

How to combine 2 LDAP queries

How to combine 2 LDAP queries

(OP)
Hey guys, I have these two queries I'd like to combine into one.  Is there any way of doing it?

Query 1: (&(!cn=SystemMailbox{*})(&(&(ou>="")(name=executive*)(objectCategory=organizationalUnit)(ou=*operations))))

Query 2: (&(!cn=SystemMailbox{*})(&(ou>="")(name=50*)))

Thanks in advance.

RE: How to combine 2 LDAP queries

[0] The logic is the following. The rfc1960 defines the grammar of the string search filter: here keeping the relevant parts.

    [R1] <filter> ::= '(' <filtercomp> ')'
    [R2] <filtercomp> ::= <and> | <or> | etc ...
    [R3] <and> ::= '&' <filterlist>
    [R4] <or> ::= '|' <filterlist>
    [R5] etc...
    [R6]  <filterlist> ::= <filter> | <filter> <filterlist>
    [R7-R19] etc...

[1] The existing filters (query 1 and query 2) symbolically shown can be combined using R1,R2,R3 and R6.

     filter_1 -> (filtercomp_1)
     filter_2 -> (filtercomp_2)
     filter_combined -> (&(filtercomp_1)(filtercomp_2))

[1.1] where it is observed that R6 effective mean a filterlist can be concatination of filters.

    <filterlist> ::= <filter> | <filter><filter> | <filter><filter><filter> | ...

and in [1], it uses the case of the second case on the right-hand side.
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close