How can I change single-valued attribute to repeating keeping the value in place

Ashok Thati
edited February 11, 2022 in Analytics #1

Hi,

We are required to change a single-valued attribute to repeating keeping the value in place. Is there a way that I can do by DQL or API?
If you have a solution, please post it here.

Thank you.
Ashok

Comments

  • I got partial solution, but can any one help to make it complete?

    Please help.

    Alter type my_type add c_new_name char(20) repeating publish;

    ** would need the code to copy the c_name values into the c_new_name[0] **

    Alter type my_type drop c_name publish;

    Update my_type object set c_new_name = c_name;

    Thank you.
    ashok

  • Which product and version are you running?

    Warning No formatter is installed for the format ipb
  • Hi Jeff,

    Documentum 7.2
    CS 7.2

    I think I got a solution:
    1) Creating a new repeating attribute:
    Alter type my_type add new_repeating_attr char(20) repeating publish;
    2) To move the old_single_attr value to new_repeating_attr for each object
    UPDATE OBJECT APPEND new_repeating_attr = old_single_attr
    3) drop or hide the old_single_attr.

    Thank you.
    Ashok

  • But this solution is not 'in place'.
    Do you think it can be done with 'in place' meaning without moving the attribute values from one attribute to another?

  • I suspected you were asking in the wrong forum. I think this is the link you need:

    https://communities.opentext.com/forums/categories/documentum_developer

    Warning No formatter is installed for the format ipb