开发者

DQL to get i_chronicle_id from r_object_id

I have a situation like this: I need to find out the i_chronicle_id of a document. If I try with r_object_id(i.e select i_chronicle_id from dm_document where r_object_id='some id', it will return me the i开发者_如何学运维_chronicle_id. Then no problem. But if someone has modified the document(checked out and checked in) my above query doesn't work because the r_object_id has changed in that situation, which I do not know. Can anyone help me with dql in such a situation?

Note: The reason why I search for the i_chronicle_id is to get the latest r_object_id.


try doing something like the following

select r_object_id from dm_document 
where i_chronicle_id in (
    select i_chronicle_id from dm_document (ALL) where r_object_id = ID('?')
)

The (ALL) keyword after the type selects all versions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜