ORA-01747:

select b.emp_category_id,max(a.basic_salary)
from m_pis_employee a,m_pis_emp_category b
where a.emp_category_id=b.emp_category_id
group by b.emp_category_id;
this one run successfully...but when i want to group by on all column present in table b then what the syntax. i am written below one but its return a error.there is total 15 column in table b
select b.*,max(a.basic_salary)
from m_pis_employee a,m_pis_emp_category b
where a.emp_category_id=b.emp_category_id
group by b.*
ORA-01747: invalid user.table.column, table.column, or column specification.
plz help me...

Hi,
You will have to put all the column names from table m_pis_emp_category in the GROUP BY clause. You cannot use * in thesame.
Regards
Ameya

Similar Messages

  • ORA-01747 Error in jsp page

    Hi,
    I am getting Internal Servlet Error:
    javax.servlet.ServletException: SQL error: ORA-01747: invalid
    user.table.column, table.column, or column specification
    <%@ page language="java" %>
    <%@ page import="com.ora.jsp.sql.*" %>
    <%@ page import="com.ora.jsp.util.*" %>
    <%@ page import="sx_gr.beans.*" %>
    <%@ include file="../include/timeoutCheck.jsp" %>
    <%@ taglib uri="/orataglib" prefix="ora" %>
    <%@ include file="../include/dataSource.jsp" %>
    <%      String AX=request.getParameter("AXMonth") + "-" +
                      request.getParameter("AXDay") + "-" +
                      request.getParameter("AXYear");
        String pFlag = "T";
        if (request.getParameter("pFlag") == null)
            pFlag = "T";
    %>
    <ora:sqlTransaction dataSource="senddetail" >
    <ora:sqlUpdate >
            UPDATE Sender  SET   send_Id= ?,Send_Status= ?,AX= ?,
                WHERE   s_id= ?
            <ora:sqlStringValue param="send_Id"/>
            <ora:sqlStringValue param="Send_Status"/>
            <ora:sqlDateValue   stringValue="<%= AX %>" pattern="MON-dd-yyyy" />
    </ora:sqlUpdate>
    <%-- Close the transaction --%>
    </ora:sqlTransaction>Can anyone help me out.?
    I have the privilleges to update too.
    Thanks,
    Aarthy

    Take the last comma out:
    UPDATE Sender SET send_Id= ?,Send_Status= ?,AX= ?,
    should be
    UPDATE Sender SET send_Id= ?,Send_Status= ?,AX= ?
    be sure there's a space between the bind parameter and the WHERE.
    Why use an Oracle tag library when there's JSTL?
    Why have database stuff in a JSP at all? Better to put it in an object and let the JSP be pure view, as it should be.

  • Errors ORA-01747 / ORA-00933 ???

    I'm running Oracle 8i on win98.
    When I try to update numbers in a NUMBER(7,3) column with values like 18,48 I get this errormessage:
    ORA-01747: invalid user.table.column-, table.column- or columnspecification
    If I enter numbers without decimals in the same column, I get this error-message:
    ORA-00933: SQL-command incorrectly terminated.
    (both messages are translated from danish)
    What is wrong ?
    Jesper

    all that means..is
    ora-01747
    A column name was specified improperly in the current SQL statement
    ORA-00933: SQL command not properly ended
    Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement.
    ORDER BY cannot be used to create an ordered view or to insert in a certain order. Also, an improper SQL ending occurs if IN clause is used with only one argument (IN(X),
    for example). An IN clause must have two or more arguments.
    Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL statement. For example, to order the
    rows of a view, do so when querying the view and not when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for
    indented lines and delete these spaces.
    these are pretty typicall errors...
    hope this helps
    [email protected]

  • Bug in UpdatableResultSet causes ORA-01747

    Hi,
    when calling select, it is necessary to put column names colliding with reserved words in double-quotes.
    In that case, select works fine, but when the corresponding colum is updated, the latest thin JDBC driver throws an exception in updateRow():
    java.lang.RuntimeException: java.sql.SQLException: ORA-01747: invalid user.table.column, table.column, or column specification.
    Allways adding the quotes in prepare_updateRow_statement(int _numColsChanged) seems to fix the problem (see below), but it may introduce a new problem with case (in)sensitivity (?) 
    original code (guess based on the bytecode):
    if(j > 0)
    updateSql.append(", ");
    updateSql.append(
    getInternalMetadata()
    .getColumnName(m_idxColsChanged[j] + 1));
    updateSql.append(" = ? ");
    fixed:
    if(j > 0)
    updateSql.append(", ");
    updateSql.append('"');
    updateSql.append(
    getInternalMetadata()
    .getColumnName(m_idxColsChanged[j] + 1));
    updateSql.append("\" = ? ");
    I must admit that I am not very happy with the quality and compatibility of the drivers. Yesterday I had to spend a lot of time to figure out that Oracle had taken the freedom to rename the SQL92 standard scalar function "position" to "instr". Of course this would have been a lot easier if the exception would not have said something useful instead of "right parenthesis missing" or "colum not found" (keeping the actual name of the "column" a secret).
    Today I had to learn that when calling 'select("*")', it is not possible to move to the insert row. Again, the error message did not say "sorry, we took the freedom not implement moveToInsertRow() for select *" (which at least would have made the workaround obvious), but "table is read only".
    Perhaps forcing developers to install two different open source alternatives to distinguish between own bugs, incompatibilities and Oracle issues is not the best idea to keep them loyal.
    Best regards
    Stefan Haustein

    Hi,
    when calling select, it is necessary to put column names colliding with reserved words in double-quotes.
    In that case, select works fine, but when the corresponding colum is updated, the latest thin JDBC driver throws an exception in updateRow():
    java.lang.RuntimeException: java.sql.SQLException: ORA-01747: invalid user.table.column, table.column, or column specification.
    Allways adding the quotes in prepare_updateRow_statement(int _numColsChanged) seems to fix the problem (see below), but it may introduce a new problem with case (in)sensitivity (?) 
    original code (guess based on the bytecode):
    if(j > 0)
    updateSql.append(", ");
    updateSql.append(
    getInternalMetadata()
    .getColumnName(m_idxColsChanged[j] + 1));
    updateSql.append(" = ? ");
    fixed:
    if(j > 0)
    updateSql.append(", ");
    updateSql.append('"');
    updateSql.append(
    getInternalMetadata()
    .getColumnName(m_idxColsChanged[j] + 1));
    updateSql.append("\" = ? ");
    I must admit that I am not very happy with the quality and compatibility of the drivers. Yesterday I had to spend a lot of time to figure out that Oracle had taken the freedom to rename the SQL92 standard scalar function "position" to "instr". Of course this would have been a lot easier if the exception would not have said something useful instead of "right parenthesis missing" or "colum not found" (keeping the actual name of the "column" a secret).
    Today I had to learn that when calling 'select("*")', it is not possible to move to the insert row. Again, the error message did not say "sorry, we took the freedom not implement moveToInsertRow() for select *" (which at least would have made the workaround obvious), but "table is read only".
    Perhaps forcing developers to install two different open source alternatives to distinguish between own bugs, incompatibilities and Oracle issues is not the best idea to keep them loyal.
    Best regards
    Stefan Haustein

  • ORA-01747 when updating a remote table

    Hi,
    Here is my table :
    SQL> desc infolig2.pylone_type
    Nom NULL ? Type
    PYL_CODE_PYLONE NOT NULL VARCHAR2(32)
    OPY_CODE NOT NULL VARCHAR2(32)
    NPY_CODE NOT NULL VARCHAR2(32)
    PYL_TENS_CONS VARCHAR2(32)
    PYL_NB_TERNE FLOAT(126)
    PYL_HAUT_TOTAL FLOAT(126)
    PYL_HAUT_SS_CONS FLOAT(126)
    PYL_POIDS FLOAT(126)
    PYL_SURFACE_SOL FLOAT(126)
    PYL_SURFACE_PEINTE FLOAT(126)
    PYL_DATE_CREAT NOT NULL DATE
    PYL_DATE_MODIF DATE
    PYL_TYPE_MODIF VARCHAR2(1)
    PYL_CODE_UTIL VARCHAR2(20)
    PYL_DESIGNATION VARCHAR2(50)
    PYL_ETAT VARCHAR2(15)
    PYL_INDICE_REV VARCHAR2(3)
    I need to update it from a remote database.
    So, I run the following procedure :
    set serveroutput on
    declare
    GET_DESIGNATION VARCHAR2(10) := 'AUVERGNE';
    OIP_PYL_CODE_PYLONE VARCHAR2(32) := 'TEST1';
    OIP_OPY_CODE VARCHAR2(32) := 'ORIG3';
    OIP_NPY_CODE VARCHAR2(32) := 'NATPYL2';
    OIP_PYL_TENS_CONS VARCHAR2(32) := null;
    OIP_PYL_NB_TERNE FLOAT := 1;
    OIP_PYL_HAUT_TOTAL FLOAT := null;
    OIP_PYL_HAUT_SS_CONS FLOAT := null;
    OIP_PYL_POIDS FLOAT := null;
    OIP_PYL_SURFACE_SOL FLOAT := null;
    OIP_PYL_SURFACE_PEINTE FLOAT := null;
    OIP_PYL_DATE_CREAT DATE := SYSDATE;
    OIP_PYL_DATE_MODIF DATE := SYSDATE;
    OIP_PYL_TYPE_MODIF VARCHAR2(1) := 'M';
    OIP_PYL_CODE_UTIL VARCHAR2(20) := 'RTE REFERENCE';
    OIP_PYL_DESIGNATION VARCHAR2(50) := 'TEST 1';
    OIP_PYL_ETAT VARCHAR2(15) := 'interdit';
    OIP_PYL_INDICE_REV VARCHAR2(3) := '23';
    OIP_PYL_CODE_PYLONE_SUBST VARCHAR2(32) := 'CODEPYL5';
    begin
    execute immediate 'UPDATE infolig2.PYLONE_TYPE@'||GET_DESIGNATION||' SET
    PYL_CODE_PYLONE = :1,
    OPY_CODE = :2,
    NPY_CODE = :3,
    PYL_TENS_CONS = :4,
    PYL_NB_TERNE = :5,
    PYL_HAUT_TOTAL = :6,
    PYL_HAUT_SS_CONS = :7,
    PYL_POIDS = :8,
    PYL_SURFACE_SOL = :9,
    PYL_SURFACE_PEINTE = :10,
    PYL_DATE_CREAT = :11,
    PYL_DATE_MODIF = :12,
    PYL_TYPE_MODIF = :13,
    PYL_CODE_UTIL = :14,
    PYL_DESIGNATION = :15,
    PYL_ETAT = :16,
    PYL_INDICE_REV = :17,
    WHERE PYL_CODE_PYLONE = :18'
    USING OIP_PYL_CODE_PYLONE,OIP_OPY_CODE,OIP_NPY_CODE,OIP_PYL_TENS_CONS,OIP_PYL_NB_TERNE,OIP_PYL_HAUT_TOTAL,OIP_PYL_HAUT_SS_CONS,OIP_PYL_POIDS,OIP_PYL_SURFACE_SOL,OIP_PYL_SURFACE_PEINTE,OIP_PYL_DATE_CREAT,OIP_PYL_DATE_MODIF,OIP_PYL_TYPE_MODIF,OIP_PYL_CODE_UTIL,OIP_PYL_DESIGNATION,
    upper(translate(OIP_PYL_ETAT,'éè','ee')),OIP_PYL_INDICE_REV, OIP_PYL_CODE_PYLONE_SUBST;
    exception
    when others then
    dbms_output.put_line('ERREUR ORACLE DETECTEE ***');
    dbms_output.put_line('Message Erreur : '||SUBSTR(SQLERRM,1,245));
    end;
    I receive the error :
    ORA-01747: invalid user.table.column, table.column, or columns specification
    What is the problem ?
    Regards,
    Rachel

    This reply was very useful for me. I have written insert scripts in the package where I had put comma after last_updated_date in the insert statement, I got the error -
    ORA-01747: invalid user.table.column, table.column, or column specification . After removing the comma and adding right parenthesis it worked fine
    INSERT INTO CPT_ACTIVITY_SALES (
    WS_DATE,
    ACTIVITY,
    WS_ITEM_HEAD,
    WS_FLAG,
    CREATED_BY,
    CREATED_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATED_DATE,
    (SELECT a.ws_date,
    b.activity,
    C.WS_ITEM_HEAD,
    'N',
    cUser ,
    SYSDATE,
    cUser,
    SYSDATE
    FROM CPT_SALES_LINES a,cpm_category b,CPM_ACTIVITY C
    WHERE a.COMPANY=nCompany
    AND a.SITE=ln_site
    AND a.WS_DATE=ld_ws_date
    AND a.SALES_HEADER_KEY=ln_Sales_header_key
    and B.company=A.company
    and b.category_id=a.category_id
    AND C.COMPANY=A.COMPANY
    AND C.ACTIVITY=B.ACTIVITY)

  • ASCP erroring out with ORA-00001: unique constraint (MSC.MSC_SETUP_TRANSITI

    Here is log
    =====================================================
    18-AUG 11:06:25 : ======================================== 18-AUG
    11:06:25 : Error in PROCEDURE=LOAD_SETUP_TRANSITION, TABLE=MSC_SETUP_TRANSITIONS 18-AUG 11:06:27 : COLUMN=ORGANIZATION_CODE,
    VALUE=TST:M1 18-AUG 11:06:27 : COLUMN=RESOURCE_ID, VALUE=14 18-AUG
    11:06:27 : COLUMN=FROM_SETUP_ID, VALUE=1 18-AUG 11:06:27 :
    COLUMN=TO_SETUP_ID, VALUE=2 18-AUG 11:06:27 : ORA-00001: unique constraint (MSC.MSC_SETUP_TRANSITIONS_U1) violated 18-AUG 11:06:27 :
    ======================================== 18-AUG 11:06:27 : Error in PROCEDURE=LOAD_SETUP_TRANSITION, TABLE=MSC_SETUP_TRANSITIONS 18-AUG
    11:06:27 : COLUMN=ORGANIZATION_CODE, VALUE=TST:M1 18-AUG 11:06:27 :
    COLUMN=RESOURCE_ID, VALUE=14 18-AUG 11:06:27 : COLUMN=FROM_SETUP_ID,
    VALUE=2 18-AUG 11:06:28 : COLUMN=TO_SETUP_ID, VALUE=1 18-AUG 11:06:28 :
    ORA-00001: unique constraint (MSC.MSC_SETUP_TRANSITIONS_U1) violated 18-AUG 11:06:28 : ======================================== 18-AUG
    11:06:28 : Error in PROCEDURE=LOAD_SETUP_TRANSITION, TABLE=MSC_SETUP_TRANSITIONS 18-AUG 11:06:28 : COLUMN=ORGANIZATION_CODE,
    VALUE=TST:M1 18-AUG 11:06:28 : COLUMN=RESOURCE_ID, VALUE=16 18-AUG
    11:06:28 : COLUMN=FROM_SETUP_ID, VALUE=1 18-AUG 11:06:28 :
    COLUMN=TO_SETUP_ID, VALUE=2 18-AUG 11:06:28 : ORA-00001: unique constraint (MSC.MSC_SETUP_TRANSITIONS_U1) violated 18-AUG 11:06:28 :
    ======================================== 18-AUG 11:06:28 : Error in PROCEDURE=LOAD_SETUP_TRANSITION, TABLE=MSC_SETUP_TRANSITIONS 18-AUG
    11:06:28 : COLUMN=ORGANIZATION_CODE, VALUE=TST:M1 18-AUG 11:06:28 :
    COLUMN=RESOURCE_ID, VALUE=16 18-AUG 11:06:28 : COLUMN=FROM_SETUP_ID,
    VALUE=2 18-AUG 11:06:28 : COLUMN=TO_SETUP_ID, VALUE=1 18-AUG 11:06:28 :
    ORA-00001: unique constraint (MSC.MSC_SETUP_TRANSITIONS_U1) violated 18-AUG 11:06:28 : Total resource transition = 167 18-AUG 11:06:28 : .1 minutes elapsed.
    18-AUG 11:06:30 : Procedure MSC_CL_RPO_ODS_LOAD.LOAD_IRO_DEMAND;
    started. 18-AUG 11:06:31 : <<LOAD_IRO_DEMAND>> 18-AUG 11:06:31 :
    <<CURSOR>>INSERT /*+ APPEND */ INTO DEMANDS_TST( PLAN_ID, DEMAND_ID, DISPOSITION_ID, INVENTORY_ITEM_ID, ORGANIZATION_ID, USING_ASSEMBLY_ITEM_ID, USING_ASSEMBLY_DEMAND_DATE, USING_REQUIREMENT_QUANTITY, QUANTITY_PER_ASSEMBLY, ISSUED_QUANTITY, ASSEMBLY_DEMAND_COMP_DATE, DEMAND_TYPE, ORIGINATION_TYPE, SOURCE_ORGANIZATION_ID, RESERVATION_ID, OP_SEQ_NUM, DEMAND_CLASS, REPETITIVE_SCHEDULE_ID, SR_INSTANCE_ID, PROJECT_ID, TASK_ID, PLANNING_GROUP, UNIT_NUMBER, ORDER_NUMBER, REPAIR_LINE_ID, WIP_ENTITY_ID, WIP_ENTITY_NAME, WIP_STATUS_CODE, WIP_SUPPLY_TYPE, ASSET_ITEM_ID, ASSET_SERIAL_NUMBER, COMPONENT_SCALING_TYPE, COMPONENT_YIELD_FACTOR,null,null, REFRESH_NUMBER, LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY)SELECT -1, MSC_DEMANDS_S.nextval, NVL(ms.TRANSACTION_ID,-1) DISPOSITION_ID, t1.INVENTORY_ITEM_ID, msd.ORGANIZATION_ID, t2.INVENTORY_ITEM_ID USING_ASSEMBLY_ITEM_ID, nvl(msd.USING_ASSEMBLY_DEMAND_DATE,ms.new_schedule_date),
    msd.USING_REQUIREMENT_QUANTITY, msd.QUANTITY_PER_ASSEMBLY, msd.QUANTITY_ISSUED, msd.ASSEMBLY_DEMAND_COMP_DATE, msd.DEMAND_TYPE, msd.ORIGINATION_TYPE, msd.SOURCE_ORGANIZATION_ID, msd.RESERVATION_ID, msd.OPERATION_SEQ_NUM, msd.DEMAND_CLASS, msd.REPETITIVE_SCHEDULE_ID, msd.SR_INSTANCE_ID, msd.PROJECT_ID, msd.TASK_ID, msd.PLANNING_GROUP, msd.END_ITEM_UNIT_NUMBER,
    REPLACE(REPLACE(substr(msd.ORDER_NUMBER,1,62),:v_chr10),:v_chr13)
    ORDER_NUMBER, REPAIR_LINE_ID , msd.WIP_ENTITY_ID, msd.WIP_ENTITY_NAME, msd.WIP_STATUS_CODE, msd.WIP_SUPPLY_TYPE, t3.inventory_item_id ASSET_ITEM_ID, msd.ASSET_SERIAL_NUMBER, msd.COMPONENT_SCALING_TYPE, msd.COMPONENT_YIELD_FACTOR,null,null, :v_last_collection_id, :v_current_date, :v_current_user, :v_current_date, :v_current_user FROM MSC_ITEM_ID_LID t1, MSC_ITEM_ID_LID t2, MSC_ITEM_ID_LID t3,SUPPLIES_TST ms, MSC_ST_DEMANDS msd WHERE msd.SR_INSTANCE_ID= 21 AND msd.ORIGINATION_TYPE = 77 AND msd.DELETED_FLAG= 2 AND t1.SR_INVENTORY_ITEM_ID= msd.inventory_item_id AND t1.sr_instance_id= msd.SR_INSTANCE_ID AND t2.SR_INVENTORY_ITEM_ID= msd.using_assembly_item_id AND t2.sr_instance_id= msd.SR_INSTANCE_ID AND t3.SR_INVENTORY_ITEM_ID (+)= msd.ASSET_ITEM_ID AND t3.sr_instance_id (+) = msd.SR_INSTANCE_ID AND ms.sr_instance_id= msd.SR_INSTANCE_ID AND ms.ORGANIZATION_ID= msd.ORGANIZATION_ID AND ms.DISPOSITION_ID= msd.repair_line_id AND ms.plan_id=-1 AND ms.ORDER_TYPE= 75 18-AUG
    11:06:31 : ORA-01747: invalid user.table.column, table.column, or column specification 18-AUG 11:06:31 : .1 minutes elapsed.
    ===================================================
    any help is appreciated. Just got this Bug 8661320, ref with no help. Its on R12 12.1.1

    Sundeep,
    No similar errors are reported in Metalink, so I would suggest you log a SR.
    Regards,
    Hussein

  • JDBCdriverreturnedthefollowingerrormessagejavasqlSQLExceptionORA-01747

    Hi,
    Secnario From Proxy to JDBC facing below error in adapter engine, while trasfering data from ECC to DB system.
    Database-level error reported by JDBC driver while accessing EO handling table 'PUSH_CUSTOMER_T'. JDBC driver returned the following error message: 'java.sql.SQLException: ORA-01747: invalid user.table.column, table.column, or column specification '. For details, contact your database server vendor.
    Error:
         ORA-01747: invalid user.table.column, table.column, or columns specification
    Cause:
         You tried to reference a column name, but the column name used is a reserved word in Oracle.
    where as in the DB table in our case none of the column  is the oracle reserved word.
    Kindly suggest the suitable answer....
    Thanks in Advance
    MFH

    <PUSH_CUSTOMER_T action="INSERT">
    <Key>
    <CUSTOMER_ID>111</CUSTOMER_ID>
    </Key>
    Help says key element is not to be used in an INSERT statement....for more information refer point 2 of Procedure section:
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/7b67fffde93673e10000000a114a6b/content.htm
    Regards,
    Abhishek.

  • ORA-20001: get_dbms_sql_cursor

    I am getting this error in an interactive report, the same query returns result in the sql workshop but not in the report. The query uses a dblink to access data in another database.
    The error I get is ORA-20001: get_dbms_sql_cursor error ORA-01747: invalid user.table.column, table.column, or column specification. I tried searching in this forum, but of no use.
    My Application Express 4.0.0.00.46 is running on oracle XE on windows XP machine. Can somebody help me understand this issue.

    Hi,
    SQLWorkshop uses the ANONYMOUS user to access the DB. When using application the Default Parsing schema credentials are used to access the DB/DBlinks.
    Most probably your Application Workspace Default Schema does not have access to the DB Link.
    Does the query run in a Classic report? Or from SQLPlus when you are connected as the Dfault Schema Owner of the Workspace where your application resides?
    Regards,

  • Pl sql join and selecting columns from join."t"."c": invalid at debug time

    I noticed the error at cc.Country that is shown because cc is not yet there at compile time (got that
    from searching this forum).
    Isnt that a bit weak of oracle sql developer that it doesnt compile from the outside to the inside /core but
    rather form top to bottom?
    Am I right with my conclusion? If so, how to do it otherwise i.e. specifying that cc.country is
    a column from countrycodes joined with table6 ?
    SELECT DISTINCT 0,
    2,
    SUBSTR('metable', 0, 1) || '_ABC',
    'ABC_' || 'metable',
    'ABC ' ||cc.Country ,
    '+'
    FROM table6
    LEFT JOIN COUNTRYCODE cc
    ON cc.Code = metable
    WHERE metable IS NOT NULL
    AND metable <> ''

    metalray wrote:
    hi Boneist
    thanks for your reply
    its in a plsql procedure (10g). well as you see cc is the alias
    of the table COUNTRYCODE. which does exists. the error is at 'ABC ' ||cc.Country'
    telling me"PL/SQL: ORA-01747: invalid user.table.column,..."
    when I put COUNTRYCODE next to table6 in the FROM it works but thats not what I want
    since I want to join both tables not just select from both.Can you give us your exact code and exact error message.
    I'm not finding any problem with using alias names in the query..
    SQL> select d.dname
      2        ,'EMPNAME : '||e.ename
      3  from dept d LEFT JOIN emp e ON e.deptno = d.deptno;
    DNAME          'EMPNAME:'||E.ENAME
    RESEARCH       EMPNAME : SMITH
    SALES          EMPNAME : ALLEN
    SALES          EMPNAME : WARD
    RESEARCH       EMPNAME : JONES
    SALES          EMPNAME : MARTIN
    SALES          EMPNAME : BLAKE
    ACCOUNTING     EMPNAME : CLARK
    RESEARCH       EMPNAME : SCOTT
    ACCOUNTING     EMPNAME : KING
    SALES          EMPNAME : TURNER
    RESEARCH       EMPNAME : ADAMS
    SALES          EMPNAME : JAMES
    RESEARCH       EMPNAME : FORD
    ACCOUNTING     EMPNAME : MILLER
    OPERATIONS     EMPNAME :
    15 rows selected.
    SQL>

  • Associative array EXISTS() DML

    Is there a way to include the EXISTS() method of an associative array in a DML statement? For example:
    This is fine...
    SQL> declare
    2 type distTblTyp is table of number index by varchar2(8);
    3 testTbl distTblTyp; testVar varchar2(30);
    4 begin
    5 testTbl('a') := 1;
    6 if (testTbl.exists('a')=true) then
    7 null;
    8 end if;
    9* end;
    SQL> /
    PL/SQL procedure successfully completed.
    But this fails...
    SQL> declare
    2 type distTblTyp is table of number index by varchar2(8);
    3 testTbl distTblTyp; testVar varchar2(30);
    4 begin
    5 testTbl('a') := 1;
    6 select decode(testTbl.exists('a'),true,'a','b')
    7 into testVar from dual;
    8* end;
    SQL> /
    select decode(testTbl.exists('a'),true,'a','b')
    ERROR at line 6:
    ORA-06550: line 6, column 24:
    PL/SQL: ORA-01747: invalid user.table.column, table.column, or column
    specification
    ORA-06550: line 6, column 2:
    PL/SQL: SQL Statement ignored
    PL/SQL: SQL Statement ignored
    Since I won't know which index elements exist until execution time, I want to have an insert statement (ran within a loop) with ~100 field values like:
    insert into table [tablename]
    values (
    decode(testTbl.exists('a'), true, testTbl('a'), null),
    decode(testTbl.exists('b'), true, testTbl('b'), null)
    Any suggestions appreciated.

    As Gerd suggested...
    SQL> create or replace package my_test_pk as
      2   type my_type is table of number index by varchar2(2);
      3   v_my_type my_type;
      4   function ifExists(v_i varchar2) return number;
      5   procedure runTest;
      6  end;
      7  /
    Package created.
    SQL> create or replace package body my_test_pk as
      2  function ifExists(v_i varchar2) return number is
      3     v_r number;
      4     begin
      5     v_r := 0;
      6     if (v_my_type.exists(v_i)) then v_r := 1; end if;
      7     return v_r;
      8     end;
      9  
    10    procedure runTest is
    11    v_check varchar2(2);
    12    begin
    13     v_my_type('a') := 1;
    14    select decode(ifExists('a'),1,'a',null) into v_check from dual;
    15   dbms_output.put_line(v_check);
    16     select decode(ifExists('b'),1,'b','N') into v_check from dual;
    17    dbms_output.put_line(v_check);
    18    end;
    19     end;
    20  /
    Package body created.
    SQL> exec my_test_pk.runtest;
    a
    N
    PL/SQL procedure successfully completed.
    SQL>

  • Task fails while running Full load ETL

    Hi All,
    I am running full load ETL For Oracle R12(vanila Instance) HR But 4 tasks are failing SDE_ORA_JobDimention, SDE_ORA_HRPositionDimention, SDE_ORA_CodeDimension_Pay_level and SDE_ORA_CodeDimensionJob, I changed the parameter for all these task as mentioned in the Installation guide and rebuilled. Please help me out.
    Log is like this for SDE_ORA_JobDimention
    DIRECTOR> VAR_27028 Use override value [DataWarehouse] for session parameter:[$DBConnection_OLAP].
    DIRECTOR> VAR_27028 Use override value [ORA_R12] for session parameter:[$DBConnection_OLTP].
    DIRECTOR> VAR_27028 Use override value [9] for mapping parameter:[$$DATASOURCE_NUM_ID].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_JobDimension.$$JOBCODE_FLXFLD_SEGMENT_COL].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_JobDimension.$$JOBFAMILYCODE_FLXFLD_SEGMENT_COL].
    DIRECTOR> VAR_27027 Use default value [] for mapping parameter:[mplt_BC_ORA_JobDimension.$$LAST_EXTRACT_DATE].
    DIRECTOR> VAR_27028 Use override value [DEFAULT] for mapping parameter:[$$TENANT_ID].
    DIRECTOR> TM_6014 Initializing session [SDE_ORA_JobDimension_Full] at [Fri Sep 26 10:52:05 2008]
    DIRECTOR> TM_6683 Repository Name: [Oracle_BI_DW_Base]
    DIRECTOR> TM_6684 Server Name: [Oracle_BI_DW_Base_Integration_Service]
    DIRECTOR> TM_6686 Folder: [SDE_ORAR12_Adaptor]
    DIRECTOR> TM_6685 Workflow: [SDE_ORA_JobDimension_Full]
    DIRECTOR> TM_6101 Mapping name: SDE_ORA_JobDimension [version 1]
    DIRECTOR> TM_6827 [C:\Informatica\PowerCenter8.1.1\server\infa_shared\Storage] will be used as storage directory for session [SDE_ORA_JobDimension_Full].
    DIRECTOR> CMN_1805 Recovery cache will be deleted when running in normal mode.
    DIRECTOR> CMN_1802 Session recovery cache initialization is complete.
    DIRECTOR> TM_6703 Session [SDE_ORA_JobDimension_Full] is run by 32-bit Integration Service [node01_HSCHBSCGN20031], version [8.1.1], build [0831].
    MANAGER> PETL_24058 Running Partition Group [1].
    MANAGER> PETL_24000 Parallel Pipeline Engine initializing.
    MANAGER> PETL_24001 Parallel Pipeline Engine running.
    MANAGER> PETL_24003 Initializing session run.
    MAPPING> CMN_1569 Server Mode: [ASCII]
    MAPPING> CMN_1570 Server Code page: [MS Windows Latin 1 (ANSI), superset of Latin1]
    MAPPING> TM_6151 Session Sort Order: [Binary]
    MAPPING> TM_6156 Using LOW precision decimal arithmetic
    MAPPING> TM_6180 Deadlock retry logic will not be implemented.
    MAPPING> TM_6307 DTM Error Log Disabled.
    MAPPING> TE_7022 TShmWriter: Initialized
    MAPPING> TM_6007 DTM initialized successfully for session [SDE_ORA_JobDimension_Full]
    DIRECTOR> PETL_24033 All DTM Connection Info: [<NONE>].
    MANAGER> PETL_24004 Starting pre-session tasks. : (Fri Sep 26 10:52:13 2008)
    MANAGER> PETL_24027 Pre-session task completed successfully. : (Fri Sep 26 10:52:14 2008)
    DIRECTOR> PETL_24006 Starting data movement.
    MAPPING> TM_6660 Total Buffer Pool size is 32000000 bytes and Block size is 1280000 bytes.
    READER_1_1_1> DBG_21438 Reader: Source is [dev], user [apps]
    READER_1_1_1> BLKR_16003 Initialization completed successfully.
    WRITER_1_*_1> WRT_8146 Writer: Target is database [orcl], user [obia], bulk mode [ON]
    WRITER_1_*_1> WRT_8106 Warning! Bulk Mode session - recovery is not guaranteed.
    WRITER_1_*_1> WRT_8124 Target Table W_JOB_DS :SQL INSERT statement:
    INSERT INTO W_JOB_DS(JOB_CODE,JOB_NAME,JOB_DESC,JOB_FAMILY_CODE,JOB_FAMILY_NAME,JOB_FAMILY_DESC,JOB_LEVEL,W_FLSA_STAT_CODE,W_FLSA_STAT_DESC,W_EEO_JOB_CAT_CODE,W_EEO_JOB_CAT_DESC,AAP_JOB_CAT_CODE,AAP_JOB_CAT_NAME,ACTIVE_FLG,CREATED_BY_ID,CHANGED_BY_ID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,DELETE_FLG,DATASOURCE_NUM_ID,INTEGRATION_ID,TENANT_ID,X_CUSTOM) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    WRITER_1_*_1> WRT_8270 Target connection group #1 consists of target(s) [W_JOB_DS]
    WRITER_1_*_1> WRT_8003 Writer initialization complete.
    WRITER_1_*_1> WRT_8005 Writer run started.
    READER_1_1_1> BLKR_16007 Reader run started.
    READER_1_1_1> RR_4029 SQ Instance [mplt_BC_ORA_JobDimension.Sq_Jobs] User specified SQL Query [SELECT
    PER_JOBS.JOB_ID,
    PER_JOBS.BUSINESS_GROUP_ID,
    PER_JOBS.JOB_DEFINITION_ID,
    PER_JOBS.DATE_FROM,
    PER_JOBS.DATE_TO,
    PER_JOBS.LAST_UPDATE_DATE AS CHANGED_ON_DT,      PER_JOBS.LAST_UPDATED_BY, PER_JOBS.CREATED_BY, PER_JOBS.CREATION_DATE,
    PER_JOB_DEFINITIONS.LAST_UPDATE_DATE AS AUX1_CHANGED_ON_DT,
    PER_JOB_DEFINITIONS.JOB_DEFINITION_ID,
    PER_JOBS.NAME,
    PER_JOBS.JOB_INFORMATION1, PER_JOBS.JOB_INFORMATION3,
    PER_JOBS. AS JOB_FAMILY_CODE, PER_JOB_DEFINITIONS.  AS JOB_CODE,
      '0' AS X_CUSTOM
    FROM
    PER_JOBS, PER_JOB_DEFINITIONS
    WHERE
    PER_JOBS.JOB_DEFINITION_ID = PER_JOB_DEFINITIONS.JOB_DEFINITION_ID]
    WRITER_1_*_1> WRT_8158
    *****START LOAD SESSION*****
    Load Start Time: Fri Sep 26 10:53:05 2008
    Target tables:
    W_JOB_DS
    READER_1_1_1> RR_4049 SQL Query issued to database : (Fri Sep 26 10:53:05 2008)
    READER_1_1_1> CMN_1761 Timestamp Event: [Fri Sep 26 10:53:06 2008]
    READER_1_1_1> RR_4035 SQL Error [
    ORA-01747: invalid user.table.column, table.column, or column specification
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    PER_JOBS.JOB_ID,
    PER_JOBS.BUSINESS_GROUP_ID,
    PER_JOBS.JOB_DEFINITION_ID,
    PER_JOBS.DATE_FROM,
    PER_JOBS.DATE_TO,
    PER_JOBS.LAST_UPDATE_DATE AS CHANGED_ON_DT, PER_JOBS.LAST_UPDATED_BY, PER_JOBS.CREATED_BY, PER_JOBS.CREATION_DATE,
    PER_JOB_DEFINITIONS.LAST_UPDATE_DATE AS AUX1_CHANGED_ON_DT,
    PER_JOB_DEFINITIONS.JOB_DEFINITION_ID,
    PER_JOBS.NAME,
    PER_JOBS.JOB_INFORMATION1, PER_JOBS.JOB_INFORMATION3,
    PER_JOBS. AS JOB_FAMILY_CODE, PER_JOB_DEFINITIONS. AS JOB_CODE,
    '0' AS X_CUSTOM
    FROM
    PER_JOBS, PER_JOB_DEFINITIONS
    WHERE
    PER_JOBS.JOB_DEFINITION_ID = PER_JOB_DEFINITIONS.JOB_DEFINITION_ID
    Oracle Fatal Error
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    PER_JOBS.JOB_ID,
    PER_JOBS.BUSINESS_GROUP_ID,
    PER_JOBS.JOB_DEFINITION_ID,
    PER_JOBS.DATE_FROM,
    PER_JOBS.DATE_TO,
    PER_JOBS.LAST_UPDATE_DATE AS CHANGED_ON_DT, PER_JOBS.LAST_UPDATED_BY, PER_JOBS.CREATED_BY, PER_JOBS.CREATION_DATE,
    PER_JOB_DEFINITIONS.LAST_UPDATE_DATE AS AUX1_CHANGED_ON_DT,
    PER_JOB_DEFINITIONS.JOB_DEFINITION_ID,
    PER_JOBS.NAME,
    PER_JOBS.JOB_INFORMATION1, PER_JOBS.JOB_INFORMATION3,
    PER_JOBS. AS JOB_FAMILY_CODE, PER_JOB_DEFINITIONS. AS JOB_CODE,
    '0' AS X_CUSTOM
    FROM
    PER_JOBS, PER_JOB_DEFINITIONS
    WHERE
    PER_JOBS.JOB_DEFINITION_ID = PER_JOB_DEFINITIONS.JOB_DEFINITION_ID
    Oracle Fatal Error].
    READER_1_1_1> CMN_1761 Timestamp Event: [Fri Sep 26 10:53:06 2008]
    READER_1_1_1> BLKR_16004 ERROR: Prepare failed.
    WRITER_1_*_1> WRT_8333 Rolling back all the targets due to fatal session error.
    WRITER_1_*_1> WRT_8325 Final rollback executed for the target [W_JOB_DS] at end of load
    WRITER_1_*_1> WRT_8035 Load complete time: Fri Sep 26 10:53:06 2008
    LOAD SUMMARY
    ============
    WRT_8036 Target: W_JOB_DS (Instance Name: [W_JOB_DS])
    WRT_8044 No data loaded for this target
    WRITER_1__1> WRT_8043 ****END LOAD SESSION*****
    MANAGER> PETL_24031
    ***** RUN INFO FOR TGT LOAD ORDER GROUP [1], CONCURRENT SET [1] *****
    Thread [READER_1_1_1] created for [the read stage] of partition point [mplt_BC_ORA_JobDimension.Sq_Jobs] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [TRANSF_1_1_1] created for [the transformation stage] of partition point [mplt_BC_ORA_JobDimension.Sq_Jobs] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [WRITER_1_*_1] created for [the write stage] of partition point [W_JOB_DS] has completed. The total run time was insufficient for any meaningful statistics.
    MANAGER> PETL_24005 Starting post-session tasks. : (Fri Sep 26 10:53:06 2008)
    MANAGER> PETL_24029 Post-session task completed successfully. : (Fri Sep 26 10:53:06 2008)
    MAPPING> TM_6018 Session [SDE_ORA_JobDimension_Full] run completed with [0] row transformation errors.
    MANAGER> PETL_24002 Parallel Pipeline Engine finished.
    DIRECTOR> PETL_24013 Session run completed with failure.
    DIRECTOR> TM_6022
    SESSION LOAD SUMMARY
    ================================================
    DIRECTOR> TM_6252 Source Load Summary.
    DIRECTOR> CMN_1740 Table: [Sq_Jobs] (Instance Name: [mplt_BC_ORA_JobDimension.Sq_Jobs])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6253 Target Load Summary.
    DIRECTOR> CMN_1740 Table: [W_JOB_DS] (Instance Name: [W_JOB_DS])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6023
    ===================================================
    DIRECTOR> TM_6020 Session [SDE_ORA_JobDimension_Full] completed at [Fri Sep 26 10:53:07 2008]

    To make use of the warehouse you would probably want to connect to an EBS instance in order to populate the warehouse.
    Since the execution plan you intend to run is designed for the EBS data-model. I guess if you really didn't want to connect to the EBS instance to pull data you could build one using the universal adapter. This allows you to load out of flat-files if you wish, but I wouldn't reccomend making this a habit for actual implementation as it does create another potential point of failure (populating the flat-files).
    Thanks,
    Austin

  • Numeric character problems when creating spatial index

    Hi,
    We have run into a problem when trying to create spatial indexes. The problem seems to be that an mdsys-procedure tries to use a number with a comma as decimal symbol in an update statement
    Error message:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Stmt-Execute Failure: begin mdsys.prvt_idx.execute_update(NULL,NULL,'set sdo_rtree_quality = 1,00000000 where UPPER(sdo_index_owner) = UPPER(''BK'') AND UPPER(sdo_index_name)=UPPER(''TEST_RTREE_IDX'') AND UPPER(sdo_index_table)=UPPER(''MDRT_8120$'')',NULL); end;
    ORA-29400: data cartridge error
    ORA-01747: invalid user.table.column, table.column, or column specification
    ORA-06512: at "MDSYS.PRVT_IDX", line 17
    ORA-06512: at line 1
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    Our problem seems to be identical to the one discussed in this thread: create RTREE falied on 9.2.0.4
    Regional settings, language versions etc:
    Client:
    OS: Windows 2000
    Regional options (OS): Swedish, Sweden
    Sqlplus (console and windows versions): v 9.2.0.1.0
    Registry: NLS_LANG =SWEDISH_SWEDEN.WE8MSWIN1252
    Server:
    OS: Windows Server 2003
    Regional options (OS): Swedish, Sweden
    Oracle: v 9.2.0.3.0
    Registry: NLS_LANG =SWEDISH_SWEDEN.WE8MSWIN1252
    We have also tried building the indexes after overriding these settings by setting the environment variables NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 on both the client- and the server computer. This gives exactly the same error. We have tried setting NLS_NUMERIC_CHARACTERS to '.,' instead of ',.', but this does not help either.
    We haven't tried changing the NLS_LANG registry entry on the server, because this is a production server at a customer's site that hosts several other databases, so we would prefer not to have to restart it if we can avoid it. However, as we understand it, the environment variable NLS_LANG should override the registry setting anyway, right?
    We first experienced the problem when trying to build indexes on imported data. To verify that the problem was not with the data, we wrote a simple test script that:
    1)Creates a table
    2)Creates metadata
    3)Inserts a simple geometry
    4)Tries to create an index
    The error message above is from running this script. We have verified that the script
    works ok on another database server.
    Below are the values of some of the language parameters right before running the script
    (we have tried many other settings with the same result).
    parameter...........................db................................instance...............session
    NLS_CHARACTERSET.......WE8MSWIN1252..................................................
    NLS_LANGUAGE...............AMERICAN...................AMERICAN...........AMERICAN
    NLS_NCHAR_CH...............AL16UTF16 ..........................................................
    NLS_NCHAR_CONV... ......FALSE..........................FALSE..................FALSE..
    NLS_NUMERIC_CH...---------.,---------------------------------------------------------------.,
    NLS_TERRITORY..............AMERICA......................AMERICA..............AMERICA
    The guy who started the thread referenced above solved the problem, but we haven't been able to get it working by changing registry entries and session parameters.
    The question is: Which setting will make the number in 'set sdo_rtree_quality = 1,00000000...' be generated with a . instead of a , as decimal symbol?

    Ok, so here is my plan to solve this:
    1) Change the default user locale (the language under "standards and formats") to English for the account under which the Oracle server runs.
    2) Reboot (or is there an easier way to make Oracle reload the settings?)
    This should make the index creation work. It may break something else however, so to avoid this I can set the user locale back to Swedish afterwards .
    You can subsequently change the setting and update the sdo_rtree_quality in
    the metadata and it should work fine. Do you mean I have to update the sdo_rtree_quality in some way to make it work after I have changed the default user locale back to Swedish? How do I do this?
    Thanks a million both of you!

  • Running CMP EJB in remote OC4J fails, works in embedded. Oracle 9i

    I more or less followed the EJB Tutorial (in the help) for creating a session-entity bean facade from Oracle 9i tables. Everything executes correctly in the embedded oc4j but it fails on the remote oc4j with
    java.sql.SQLException: Invalid column name
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:292)
         at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:5632)
         at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:716)
         at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1506)
         at com.evermind.sql.FilterResultSet.getString(FilterResultSet.java:585)
         at EmployeeLocalHome_EntityHomeWrapper13.findAll(EmployeeLocalHome_EntityHomeWrapper13.java:1260)
    Then I also created another simpler CMP EJB that just has 3 fields from Oracle table. This one doesn't even work in embedded oc4j :
    com.evermind.server.rmi.OrionRemoteException: Database error: ORA-01747: invalid user.table.column, table.column, or column specification
         java.util.Collection TimesheetHoursHome_EntityHomeWrapper11.findAll()
    Are there any known problems I should look out for with generating CMP EJBS with wizards?
    I think the IDE is more intuitive than WSAD. It would be great it things worked though.
    Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? It should be easy enough to add them with EJB Editor if they do not.
    Thanks for any help.

    Known issues are documented in the release notes
    http://otn.oracle.com/products/jdev/htdocs/readme_903Preview.html#ejb
    <<<Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? >>>>
    Not sure what you meant here. If you reverse engineer let us say DEPT and EMP tables, foreign key relationships between the tables are reverse engineered as CMR but there aren't any ejb-ref/ejb-local-ref tags which get generated in the deployment descriptor.
    <<It should be easy enough to add them with EJB Editor if they do not. >>
    You can double-click on the EJB to bring the EJB Module Editor and select "Relationships" node to add/edit/delete relationships visually.
    raghu
    JDev Team

  • Referencing an item value as a column name

    Hello
    I am trying to make an interactive report region source, where in the where clause there should be a column name that is built somehow like this : "table_name".:P9_LABEL (this doesn't work ;(ORA-01747: invalid user.table.column, table.column, or column specification) ). P9_LABEL is an item in the same page, which contains the column name. What is the right way to do this ?
    Tiina

    I think in that case you would need a function returning SQL Query and interactive reports (as far as I know) do not support that. Maybe, you could use a pipelined function for that (not sure). See this example on pipelined functions:
    http://apex.oracle.com/pls/otn/f?p=31517:146
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Referencing the entire row in an insert trigger

    I am trying to replace having to do the following sort of queries repeatedly by using a trigger to handle the second 2:
    My first query inserts a row and the following 2 queries insert a reference to that row into 2 other tables
    so I want to create a trigger which will insert the reference into the 2 other tables.
    my problem: how do I get this reference in the trigger? I know I can get individual values using :NEW.Column but I can't seem to figure out how to get the whole row.
    I can't select the row because its inside the trigger responding to it being inserted so I'd get that mutator error.

    Not sure why I sql*plus gives those errors. I get the same.
    When I tried to use
    print_obj(:new.object_value);
    heres the results
    SQL> CREATE OR REPLACE TRIGGER TR_BOOKING_INS AFTER INSERT ON BOOKING
    2 FOR EACH ROW
    3 DECLARE
    4 ecode NUMBER(38);
    5 thisproc CONSTANT VARCHAR2(50) := 'trap_errmesg';
    6
    7 BEGIN
    8 print_obj(:new.object_value);
    9 EXCEPTION
    10 WHEN OTHERS THEN
    11 ecode := SQLCODE;
    12 dbms_output.put_line(thisproc || ' - ' || ecode);
    13 dbms_output.put_line('fucking errors');
    14 END TR_BOOKING_INS;
    15 /
    Warning: Trigger created with compilation errors.
    SQL> show err
    Errors for TRIGGER TR_BOOKING_INS:
    LINE/COL ERROR
    6/5 PL/SQL: Statement ignored
    6/5 PLS-00201: identifier 'PRINT_OBJ' must be declared
    heres the results from 2 trigger attempts where I'm trying to do what I am wanting to do
    SQL> CREATE OR REPLACE TRIGGER TR_BOOKING_INS
    2 AFTER INSERT ON BOOKING
    3 FOR EACH ROW
    4 BEGIN
    5 INSERT INTO TABLE(SELECT G.BOOKED_FOR FROM GUEST G WHERE G.GUEST_NO = :
    NEW.GUEST_NO)
    6 VALUES (:new.object_value);
    7 EXCEPTION
    8 WHEN OTHERS THEN
    9 raise_application_error(-20001, 'Database Error');
    10 END TR_BOOKING_INS;
    11 /
    Warning: Trigger created with compilation errors.
    SQL> show err
    Errors for TRIGGER TR_BOOKING_INS:
    LINE/COL ERROR
    2/5 PL/SQL: SQL Statement ignored
    3/16 PL/SQL: ORA-00932: inconsistent datatypes: expected REF
    DANIEL.BOOKING_TY got DANIEL.BOOKING_TY
    SQL> CREATE OR REPLACE TRIGGER TR_BOOKING_INS
    2 AFTER INSERT ON BOOKING
    3 FOR EACH ROW
    4 BEGIN
    5 INSERT INTO TABLE(SELECT G.BOOKED_FOR FROM GUEST G WHERE G.GUEST_NO = :
    NEW.GUEST_NO)
    6 VALUES (REF(:new.object_value));
    7 EXCEPTION
    8 WHEN OTHERS THEN
    9 raise_application_error(-20001, 'Database Error');
    10 END TR_BOOKING_INS;
    11 /
    Warning: Trigger created with compilation errors.
    SQL> show err
    Errors for TRIGGER TR_BOOKING_INS:
    LINE/COL ERROR
    2/5 PL/SQL: SQL Statement ignored
    3/19 PL/SQL: ORA-01747: invalid user.table.column, table.column, or
    column specification
    SQL>

Maybe you are looking for

  • Problems printing a postscript in Illustrator CS4

    I am trying to print a PS in illustrator CS4.  The file is quite large, 388 MB. However, this is usually not a problem.  I work at a sign company that produces casino signage, so the files from our client are quite large. Any suggestions as to why th

  • Is there a way to undo a backup that overwrote a previous backup on itunes?

    I recently restored my iphone due to some complications, everything was going good. I forgot my encrypt backup password and had to restore as a new iphone. I was planning on restoring it again once i remembered my password however itunes backed the n

  • IDES upgrade from 4.7 to ECC 6.0

    Hi, I have windows 32 bit system there I would like to perform an upgrade simulation from 4.7 to ECC 6.0. Can I perform IDES R3 4.7 to ECC Non-Ides upgrade or I have to Upgrade to IDES ecc 6.0? In case of IDES ECC 6.0 I can not see any Upgrade Export

  • Disable View PDF Results not working

    I am using Adobe 9 with Windows 7 and I am trying to disable View PDF Results via printing preferences. Everytime I uncheck the box to View PDF Results, it does not stay unchecked. It is driving me nuts. I have searched this forum and a few others ha

  • IPhone 4 won't install new apps.

    Will only update old apps. When I select to install and enter my iTunes password, it flickers and goes from "installing" back to "free" or "buy". I've tried restoring and that did not help. This problem began after installing iOS 6.