ora-01788 CONNECT BY clause required in this query block

SQL>   SELECT LEVEL BOM_LEVEL,
  2          -- P_TOP_ASSEMBLY_ITEM_ID TOP_ASSEMBLY_ITEM_ID,
        BOM.ASSEMBLY_ITEM_ID ASSEMBLY_ITEM_ID,
        BIC.COMPONENT_ITEM_ID COMPONENT_ITEM_ID,
        BOM.ORGANIZATION_ID,
        MSI1.WIP_SUPPLY_TYPE ASSEMBLY_WIP_SUPPLY_TYPE,
        MSI2.WIP_SUPPLY_TYPE COMPONENT_WIP_SUPPLY_TYPE,
        BIC.COMPONENT_QUANTITY COMPONENT_QUANTITY,
        BIC.OPERATION_SEQ_NUM COMPONENT_OPERATION_SEQ_NUM
        --MSI2.PLANNING_MAKE_BUY_CODE  
          FROM smperp.BOM_STRUCTURES_B BOM,
              smperp.BOM_COMPONENTS_B BIC,
               smperp.MTL_SYSTEM_ITEMS_B MSI1,
               smperp.MTL_SYSTEM_ITEMS_B MSI2
         WHERE TRUNC(BIC.EFFECTIVITY_DATE) <= sysdate
            AND (BIC.DISABLE_DATE IS NULL OR TRUNC(BIC.DISABLE_DATE) > sysdate)
            AND BOM.ALTERNATE_BOM_DESIGNATOR IS NULL
                AND BOM.COMMON_BILL_SEQUENCE_ID = BIC.BILL_SEQUENCE_ID
                AND MSI1.INVENTORY_ITEM_ID = BOM.ASSEMBLY_ITEM_ID
                AND MSI2.INVENTORY_ITEM_ID = BIC.COMPONENT_ITEM_ID
                AND MSI1.ORGANIZATION_ID = 527
                AND MSI2.ORGANIZATION_ID = 527
                AND BOM.ORGANIZATION_ID = 103
                AND BOM.ASSEMBLY_ITEM_ID = 3736765; 
          FROM smperp.BOM_STRUCTURES_B BOM,
                      *
ERROR at line 11:
ORA-01788: CONNECT BY clause required in this query block
 
 
查看参数"_allow_level_without_connect_by"
 
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describe FROM SYS.x$ksppi x, SYS.x$ksppcv y
WHERE x.inst_id = USERENV ('Instance') AND y.inst_id = USERENV ('Instance') AND
x.indx = y.indx AND x.ksppinm LIKE '%&par%'
Enter value for par: _allow_level_without_connect_by
old   3: x.indx = y.indx AND x.ksppinm LIKE '%&par%'
new   3: x.indx = y.indx AND x.ksppinm LIKE '%_allow_level_without_connect_by%'
NAME
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
DESCRIBE
--------------------------------------------------------------------------------
_allow_level_without_connect_by
FALSE
allow level without connect by

SQL> alter system set  "_allow_level_without_connect_by"=true scope=both;
System altered.
 
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24849178/viewspace-732153/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24849178/viewspace-732153/

你可能感兴趣的:(数据库)