Posts Tagged ‘TRUNCATE’


October 24, 2010 Comments off

DQL is the acronym for Document Query Language, the SQL-like language that you use to query the Docbase. Using DQL, you can retrieve, update, and delete objects and create new objects. You can also use DQL to access registered tables—tables in the underlying RDBMS that are known to eContent Server but that are not part of the Docbase.
Some special key words of DQL :
• User
• True
• False
• Any
• Type
• Folder
• Cabinet
• All
• Id
• Append
• Truncate
• Insert………….

Eg 1
Select * from dm_document where owner_name = User — User here refers to user of the session
Eg 2
SELECT “r_object_id” FROM “dm_sysobject”
WHERE ANY “authors” = ’suresh’
Here, authors is repeating valued field and the query returns all the rows which have “suresh” as one of the “authors”
Eg 3
Update DQLs
UPDATE “dm_document” OBJECTS
APPEND authors=”Prem”
WHERE “title” = ’ACS’
This adds a new author to the end of the list. Ie already if 3 authors are there, this becomes the 4th.
Eg 4
To delete a value in a repeating attribute, use the remove option as the update clause and specify the index value associated with the value.UPDATE “nm_document’ OBJECT
REMOVE authors[4]
WHERE “title” = ’OLD FILE’
Eg 5
Consider three types of document – doctype1, doctype2 and doctype3. To get documents of type doctype1 or doctype3 we use the “Type” key word.
Select * from dm_document WHERE Type (doctype1) OR Type (doctype3)
Eg 6
To query from specific folders we use the folder key word.
Everything in documentum is out in folders which are there in Cabinet.
Select * from dm_document
WHERE Folder(‘/cabinet/folder1’);
Select * from dm_document
WHERE Folder(‘/cabinet/folder1’, descend);
If the Descend key word is NOT used, it queries only the folder specified but not subfolders underneath the folder
CREATE —- used to create object types
CREATE…OBJECT — used to create instances
CREATE dm_document Object
SETFILE=”D:\docs” with
Content_format = “MSW8”;

Categories: DOCUMENTUM Tags: , , ,
%d bloggers like this: