The UPDATEADD statement adds values to the exiting attributes, creating the attribute if it does not already exists. The basic UpdateAdd statement has 4 clauses:
The UPDATEADD clause specifies the entry(ies) to update. The SET clause specifies the attributes to update. The WHERE clause specifies the condition. The WHERE clause is optional; if missing, all the entries within the container will be updated depending upon the query scope. The QUERY SCOPE is new for ldap query, if missing the default is subtree scope and will return all the subentries (you can change the default from the radio buttons at the bottom of sql editor). UpdateAdd statement has the following general format
UPDATEADD Entry SET set-list [WHERE predicate] [QuerryScope]
To add a new value to an existing attribute for e.g mail you write a statement as:
UPDATEADD ou=testusers,o=stooges SET mail='newaddress@ldapsoft.com'
This sql will update all the entries in the cn=testuser,DC=LDAPSOFT,DC=COM container as the default scope is subtree scope, the above update statement is same as :
UPDATEADD ou=testusers,o=stooges SET mail='newaddress@ldapsoft.com' subtreescope
To update only the immediate children you type sql statement as:
UPDATEADD ou=testusers,o=stooges SET mail='newaddress@ldapsoft.com' onelevelscope
To update the entry only you type sql statement as:
UPDATEADD ou=testusers,o=stooges SET mail='newaddress@ldapsoft.com' basescope
Before and after snapshot after running the following UPDATEADD statement:
UPDATEADD cn=testuser1,ou=testusers,o=stooges SET description ='description2'

Related Links:
Difference b/w Update, UpdateAll and UpdateReplace
| LDAP Admin Tool Home Page | |