The UPDATEREPLACE statement replace existing attribute value if the match is found. Ideally you may want to use this statement where attribute has multiple values and you want to replace one value. The basic UpdateReplace statement has 4 clauses:
The UPDATEREPLACE 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 required and must contain the attribute value to replace with. 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). UPDATEREPLACE statement has the following general format
UPDATEREPLACE Entry SET set-list [WHERE predicate] [QuerryScope]
Before and after snapshot after running the following UPDATEREPLACE statement:
UPDATEREPLACE cn=testuser1,ou=testusers,o=stooges SET description ='description3' where description ='description2'
Difference b/w Update, UpdateAll and UpdateReplace
Update statement examples
|Ldap plus AD Help Desk Professional Tool Home Page|