CDO$HELP.HLB  —  CDO Commands, DETACH_FROM_COMPOSITE
    Format

              { COLLECTION              }
              { FIELD                   }
      DETACH  { RECORD                  }
              { FILE_ELEMENT  type-name }
              {                         }
              { GENERIC  type-name      }

                [qualifier]  element-name ,...

              FROM composite-name  [ AUDIT IS /*text*/ ]

1  –  Parameters

1.1  –  type-name

    Specifies the type of the element you are detaching.

1.2  –  element-name

    Specifies the name of the element from which you are detaching.
    You can substitute an asterisk (*)  wildcard character for this
    parameter.

1.3  –  composite-name

    Specifies the name of the composite from which you are detaching.

1.4  –  text

    Adds information to the history list entry. Valid delimiters are
    /* */ or double quotation marks (" ").

    You can use Japanese to document comments in the AUDIT clause for
    a field. To do this, use the SET CHARACTER_SET command, and set
    the character_set of the session to DEC_KANJI.

2  –  Qualifiers

2.1    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text identifying each element as
    the element is detached.

3  –  Description

    The DETACH FROM COMPOSITE command detaches an element from a
    composite. The element must be a controlled element that is not
    currently reserved. It also must be currently attached to the
    composite.

    Before you issue the DETACH FROM COMPOSITE command, you must
    have a context set and your composite reserved. The SHOW CONTEXT
    and SHOW RESERVATIONS commands indicate whether these conditions
    exist.

    You can use the DETACH FROM COMPOSITE command in conjunction with
    the DEFINE, RESERVE, REPLACE, and ATTACH TO COMPOSITE commands
    to link collections into collection hierarchies. See the DEFINE
    COLLECTION command for an example of a collection hierarchy.

    You can also use the DETACH FROM COMPOSITE and ATTACH TO
    COMPOSITE commands to move between lines of descent. See the
    Oracle CDD/Repository Architecture Manual for more information.

4  –  Examples

    1.CDO>  RESERVE COLLECTION SALES_EACH_PRODUCT
      CDO>  ATTACH FIELD PART_NUMBER TO SALES_EACH_PRODUCT
      CDO>  REPLACE COLLECTION SALES_EACH_PRODUCT
         .
         .
         .
      CDO>  RESERVE COLLECTION SALES_EACH_PRODUCT
      CDO>  DETACH FIELD PART_NUMBER FROM SALES_EACH_PRODUCT
      CDO>  REPLACE COLLECTION SALES_EACH_PRODUCT

      In this example, the DETACH command detaches an element from a
      collection.

    2.CDO>  RESERVE COLLECTION EMPLOYEE_RECORDS
      CDO>  DETACH FIELD FIRST_NAME(2:BRANCH:2) FROM EMPLOYEE_RECORDS
      CDO>  ATTACH FIELD FIRST_NAME(2) TO EMPLOYEE_RECORDS
      CDO>  REPLACE COLLECTION EMPLOYEE_RECORDS

      In this example, the DETACH FROM COMPOSITE command detaches a
      version in the branch line of descent, FIRST_NAME(2:BRANCH:2),
      from the EMPLOYEE_RECORDS collection. After you attach a
      version in the main line, FIRST_NAME(2), to EMPLOYEE_RECORDS
      you can create new versions in the main line, instead of in the
      branch line where you had been working.
Close Help