2

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

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

或者

select * from dm_folder where folder($param$)

其中参数是 object_name

适用于单个下拉选择。我试图插入“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"

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

4

1 回答 1

2

试试这个:

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>) 

这将返回文件柜下的所有文件夹对象

于 2019-10-02T11:00:40.323 回答