This discussion is archived
3 Replies Latest reply: Nov 19, 2012 1:40 PM by 896983 RSS

Non unique addressing in MODEL dimensions?

896983 Newbie
Currently Being Moderated
Hello all,

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

Req:

I have a field with duplicate words like 'PRESIDENT;PRESIDENT-EXECUTIVE;PRESIDENT' ( seperated by semicolon) I need to remove duplicate words from a line. I have like 1Million rows to work on...
ORA-32638: Non unique addressing in MODEL dimensions
32638. 00000 -  "Non unique addressing in MODEL dimensions"
*Cause:    The address space defined for the MODEL (partition by and dimension by
           expressions) do not uniquely identify each cell.
*Action:   Rewrite the MODEL clause. Using UNIQUE SINGLE REFERENCE
           option might help.
First time i am using Model Dimension by
SELECT   BIO, RTRIM (str_new, ';') new_str
  FROM   db_temp
MODEL
   DIMENSION BY (0 dim)
   MEASURES (BIO, BIO || ';' STR_NEW)
   RULES
      ITERATE (1000) UNTIL (STR_NEW[0] = PREVIOUS (STR_NEW[0]))
      (str_new [0] =
            REGEXP_REPLACE (str_new[0], '(^|;)([^;]+;)(.*?;)?\2+', '\1\2\3'));
Any Better approach to handle this type of situation other than Model Dimension by

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points