Select DQL

Here is the list of Select DQL statements for various situations. These DQL statements are in very generic format. Please modify for your own situation.

1. Find groups associated with a docbase user in the Docbase
select * from dm_group where any users_names in ('<user name>')

2. Find all the object types and associated parent object types, ordered by parent object types, in your company docbase(s)
select name, super_name from dm_type where name like '<your-company-obj-type-convention>' order by super_name

3. Find checked out or locked out objects in a folder or which meet certain criteria
select object_name, r_object_id from <your-object-type> where folder ('/Folder1/folder2',descend) and r_lock_owner is nullstring

4. Find documents with a specific version label (ex: WIP or Approved)
      First find what are the lifecycles you use for the documents in the docbase.
      If there is only one lifecycle for your docbase, that will be more easy !
      select * from dm_policy and find the r_object_id of your lifecycle and dump the object.

5. See the state_name and i_state_no values associated with the lifecycle.
Now execute the following given DQL.
    select r_object_id, object_name , r_version_label from <your-object-type> where r_current_state=<numeric number you found from the i_state_no>

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: