DQL to get folder and file name
I need help in getting the folder and the file name from documentum with the help of i_folder_id.
My query :
SELECT
r_folder_path
FROM
dm_folder
WHERE
r_object_id in (select i_folder_id from t_pub_document search document contains '55000')
This gives me the folder path but I alse need the file names which has text 55000.
I tried this but no luck I get error from web service.
select s.object_name, f.r_folder_path
from t_pub_document s, dm_folder f
where s.i_folder_id = f.r_object_id
and s.i_folder_id in (select i_folder_id from t_pub_document search document contains '55000'))
Best Answer
-
Hi,
first of all : i_folder_id is a repeating, you need the keyword "any" to be able to query it.
second : r_folder_path is also a repeating and a restriction of DQL is that you can't make a join and put a repeating in the select clause at the same time.
What you can do is something similar to this :
select d.r_object_id, d.object_name, f.r_folder_path from (select r_object_id, r_folder_path from dm_folder) f, (select r_object_id, object_name, i_folder_id from dm_document where FOLDER('/Temp',DESCEND)) d where f.r_object_id = d.i_folder_id and f.r_folder_path is not null;
0
Answers
-
Hi,
first of all : i_folder_id is a repeating, you need the keyword "any" to be able to query it.
second : r_folder_path is also a repeating and a restriction of DQL is that you can't make a join and put a repeating in the select clause at the same time.
What you can do is something similar to this :
select d.r_object_id, d.object_name, f.r_folder_path from (select r_object_id, r_folder_path from dm_folder) f, (select r_object_id, object_name, i_folder_id from dm_document where FOLDER('/Temp',DESCEND)) d where f.r_object_id = d.i_folder_id and f.r_folder_path is not null;
0 -
Thanks a lot that idea worked out for us. New query :
select d.r_object_id, d.object_name, f.r_folder_path from (select r_object_id, r_folder_path from dm_folder) f, (select r_object_id, object_name, i_folder_id from t_pub_document search document contains '55000') d where f.r_object_id = d.i_folder_id and f.r_folder_path is not null;
0
Categories
- All Categories
- 122 Developer Announcements
- 54 Articles
- 148 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 7 XM Fax
- Follow Categories