Writing DQL script for multi object ids using "UPDATE dm_job OBJECTS SET is_inactive = true WHERE r_

Ken_Antwi
Ken_Antwi Member
edited August 1, 2013 in Documentum #1

I have mult object ids and I want to insert the object ids into this DQL

update dm_job objects set is_inactive=true where r_object='<targer r_object_id>'

I do have muti ids please how do I write DQL in script form to update all the ids using the DQL

Thanks

Tagged:

Comments

  • christopher.imes
    edited July 31, 2013 #2

    Please consider moving this question as-is (no need to recreate) to the proper forum for maximum visibility.  Questions written to the users' own "Discussions" space don't get the same amount of attention and questions can go unanswered for a long time. 

    You can do so by selecting "Move" under ACTIONS along the upper-right.  Then search for and select: "Documentum" (Developer Network) which would be the most relevant for this question.

  • Ken_Antwi
    Ken_Antwi Member
    edited July 31, 2013 #3

    Thanks

  • vincentklock
    vincentklock Member
    edited August 1, 2013 #4

    You can use "IN" in you DQL query:


    UPDATE dm_job OJBECTS SET ...
    WHERE r_object_id IN ('<ID1>', '<ID2>'...);

    The IN keyword can also be used, as in SQL, with a subquery:


    UPDATE dm_job OBJECTS
    SET ...
    WHERE r_object_id IN (
        SELECT <anything>
    );
  • Ken_Antwi
    Ken_Antwi Member
    edited August 1, 2013 #5


    I will be using SAMSON for the update you think

    • UPDATE dm_job OJBECTS SET ...  
    • WHERE r_object_id IN ('<ID1>', '<ID2>'...);  will work
  • yamangoyal
    yamangoyal Member
    edited August 1, 2013 #6

    you can create script using excel or edit+ and then run in samson using @filename.dql


    UPDATE dm_job OJBECTS SET ... WHERE r_object_id='<ID1>';
    UPDATE dm_job OJBECTS SET ... WHERE r_object_id='<ID2>';
    UPDATE dm_job OJBECTS SET ... WHERE r_object_id='<ID3>';
    UPDATE dm_job OJBECTS SET ... WHERE r_object_id='<ID4>';
    ..
    ..
    ..
    ..