Search code examples
documentum

RETURN_TOP N attribute not working in Documentum


We are currently running a Documentum version of 4.x. We are trying to restrict the search results to 200. But this attribute is not being recognized. We are including the restriction limit of 200 through a websphere environment variable. Please find below the error which we see on the UI.

User Pref Exception: Documentum Exception thrown: [DM_QUERY_E_SYNTAX]error: "A Parser Error (syntax error) has occurred in the vicinity of: SELECT r_lock_machine,r_lock_date,r_lock_owner,r_object_id,r_object_type,acl_domain,acl_name,tracking_number,vwip_flag,status,description,vbom_number,r_modify_date,location FROM virtual_bom WHERE DATEDIFF(day,r_modify_date,DATE(TODAY)) <= 0 AND r_modifier = 'dmadmin' AND tracking_number NOT LIKE '%AAAA%' ORDER BY r_modify_date DESC ENABLE"

Solution

  • You are using very old Documentum version. Frankly, there is no available documentation for version <5.3. However in general, usage RETURN_TOP N depend of database type that is used for your repository.

    For example (for version 5.3), if your repository is configured on SQL Server and DB2 database Content Server will really translate your hint to generated SQL yet if your repository is configured over Oracle and Sybase Content Server will only narrow result set after it gets data from database.

    You should be asking yourself if RETURN_TOP hint is supported in your CS version.