Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256

    Unanswered: Subquery error on creating Mat. View

    The following expression throws an ORA-22818 error:

    Code:
    select
    T.OWNER,T.CONSTRAINT_NAME,T.TABLE_NAME,s.COLUMN_NAME,S.POSITION,V.NULLABLE,V.DATA_DEFAULT,V.DATA_TYPE from sys.all_constraints t,SYS.ALL_CONS_COLUMNS S,
    SYS.ALL_TAB_COLUMNS V where
    T.OWNER = S.OWNER AND T.TABLE_NAME = S.TABLE_NAME AND T.CONSTRAINT_NAME = S.CONSTRAINT_NAME AND
    S.OWNER = V.OWNER AND S.TABLE_NAME = V.TABLE_NAME AND S.COLUMN_NAME = V.COLUMN_NAME AND 
    t.constraint_type = 'R' and t.status = 'ENABLED' AND T.TABLE_NAME LIKE 'TB_%' AND V.NULLABLE = 'Y' AND
    T.OWNER = 'TEST'
    3 objects and 2 joins, no subquery.
    Anyone an idea?
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  2. #2
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    Forget about the error for a moment (which I dont get), you will not be able to create a materialized view of such a query since it includes a LONG column.

Posting Permissions

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