Documentum DQL 从几个文件夹中获取列表子文件夹

Documentum DQL Getting list subfolders from a few folders

大家好! 我这个月开始使用 Documentum,这是我的问题。 有多个 select 带柜子的下拉列表。我必须选择其中一些才能在下面的结果列表中获取内部文件夹列表。 此查询:

select * from dm_folder where folder(id($param$))

select * from dm_folder where folder($param$)

其中参数是 object_name

适用于单个下拉菜单 select。 我试过插入 "in"

select * from dm_folder where folder in($param$)

结果

[DM_QUERY_E_SYNTAX]error:  "A Parser Error (syntax error) has occurred in the vicinity of:  select * from dm_folder where folder in" 

select * from dm_folder where folder(id in($param$))

结果

select * from dm_folder where folder(id in ('0c0511d48000105',' 0c0511d48000106'))

[DM_QUERY_E_SYNTAX]error:  "A Parser Error (syntax error) has occurred in the vicinity of:  select * from dm_folder where folder(id in"

和 return 上面查询中的多值标志,但它不起作用。 有人可以帮忙吗?谢谢!

试试这个:

SELECT * FROM dm_folder WHERE r_object_id IN ('0c0511d48000105',' 0c0511d48000106')

我想你错在哪里已经很清楚了。您使用的关键字 FOLDER 是接受单个值作为参数的函数。

来自 DQL 指南:

The FOLDER predicate
The FOLDER predicate identifies what folders to search. The syntax is:
[NOT] FOLDER(folder_expression {,folder_expression} [,DESCEND])
The folder_expression argument identifies a folder in the current repository. You cannot search a
remote folder (a folder that does not reside in the current repository). Valid values are:
• An ID function
• The ID function (described in The ID function, page 29) identifies a particular folder.
• A folder path
A folder path has the format:
/cabinet_name{/folder_name}
Enclose the path in single quotes. Because cabinets are a subtype of folder, you can specify a
cabinet as the folder.
• The keyword DEFAULT
The keyword DEFAULT directs the server to search the user’s default folder. Note that a user’s
default folder is the same as the user’s default cabinet (because cabinets are a subtype of folders).

编辑 1:

SELECT * FROM dm_folder WHERE ANY i_folder_id IN ('0c0511d48000105',' 0c0511d48000106')

通过此查询,您要查找其父级是作为参数指定的任何文件夹的文件夹类型对象。

编辑 1:

SELECT * FROM dm_folder WHERE i_cabinet_id IN (<list of ids>) 

这将return您所有文件夹对象放在文件柜