Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Red face Unanswered: To Cast a Primary Key column

    Hi All,

    Please help me out with this issue. I have a table which has primary key of datatype CHAR. I am creating a materialized view for this table which should contain the primary column, but I need to CAST it to VARCHAR2.

    For Eg., t1 has a p1 column with primary key constraint. My Materialized View has select cast(p1 as varchar2(3 Byte). This throws an error ORA 12016.

    I want to cast a primary key column of a table.

    Please help.


    Thanks in advance...

    Siddhu......................

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool Rowid?

    Did you try to create the MV using the "WITH ROWID" clause instead of primary key?
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jul 2009
    Posts
    2
    No. Let me try this. Thanks for the reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •