ORA-01747

Hello

When executing this query, Iam getting error.

PL/SQL: ORA-01747: invalid column, table.column, or user.table.column specification
declare

cursor c1 is
select * from SCTS05MAR12.M09_NT_UV_CONTACT;

cur c1%rowtype;

begin

open c1;
loop
fetch c1 into cur;
insert into MCA20APR12.M09_NT_UV_CONTACT (ADABAS_ISN   ,       
(                                         CONTACT_NAME,        
                                          PTT_CARRIER_CD,      
                                          PTT_SEQ_NBR,         
                                          TEL_NBR     ,        
                                          FAX_NBR      ,       
                                          TELEX_NBR     ,      
                                          CONTACT_ST     ,     
                                          NETPRO_TRANSM_DT,    
                                          NETPRO_TRANSM_TM ,   
                                          NETPRO_TRANSM_ST  ,  
                                          NETPRO_TRANSM_ST_DT, 
                                          NETPRO_TRANSM_ST_TM ,
                                          NETPRO_TRANSM_ERR_CD,
                                          CRTE_DT             ,
                                          CRTE_TM             ,
                                          UPDT_DT             ,
                                          UPDT_TM             ,
                                          UPDT_PGM            ,
                                          CREATOR_ID          ,
                                          LAST_CHG_ID         ,
                                          CONTACT_ID          )
                                     values ( cur.ADABAS_ISN,          
                                               cur.   CONTACT_NAME,        
                                                  cur.PTT_CARRIER_CD ,     
                                                  cur.PTT_SEQ_NBR,         
                                                  cur.TEL_NBR   ,          
                                                  cur.FAX_NBR   ,          
                                                  cur.TELEX_NBR    ,       
                                                  cur.CONTACT_ST   ,       
                                                  cur.NETPRO_TRANSM_DT  ,  
                                                  cur.NETPRO_TRANSM_TM  ,  
                                                  cur.NETPRO_TRANSM_ST   , 
                                                  cur.NETPRO_TRANSM_ST_DT ,
                                                  cur.NETPRO_TRANSM_ST_TM ,
                                                  cur.NETPRO_TRANSM_ERR_CD,
                                                  cur.CRTE_DT  ,           
                                                  cur.CRTE_TM   ,          
                                                  cur.UPDT_DT  ,           
                                                  cur.UPDT_TM  ,           
                                                  cur.UPDT_PGM  ,          
                                                  cur.CREATOR_ID  ,        
                                                  cur.LAST_CHG_ID  ,       
                                                   STG_NT_UV_CONTACT.NEXTVAL);
                                                   
                                                   end loop;
                                                   close c1;
                                                   
        EXCEPTION
        WHEN others THEN
      DBMS_OUTPUT.PUT_LINE('Exception: ' || sqlerrm);
      close c1;
      end;        

First step would be to remove the clause WHEN OTHERS and simply allow the error appears on the screen with the exact line where its been triggered.

Once you get that check if the name of the specified object is correct. If it is, check for privileges on the table for the current user.

Tags: Database

Similar Questions

  • ORA-01747: invalid user.table.column... on the REPLACEMENT notice

    Oracle 11g Release 2

    I run an UPDATE statement. In the 'set' I am trying to update a column by using a subquery on the right side. REPLACE the statement Gets the error ORA-01747: specification of invalid column, table.column, or user.table.column.

    create table tab1
    ( file_id   number  ,
      record_id number  ,
      part_type_id number ,
      part_number  number ,
      positon_id   number ,
      notes        varchar2(255) ,
      mapped       varchar2(1) default 'N'
    )
    /
    insert into tab1 values(1,1,123,777,1,'NEW|A/C COMPRESSOR KIT','N') ;
    insert into tab1 values(1,2,123,777,2,'REMAN|A/C LINE','N') ;
    insert into tab1 values(1,3,123,777,2,'TEST NOTE','N') ;
    commit;
    select * from tab1;
    /*
      FILE_ID  RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID NOTES                     MAPPED
    --------- ---------- ------------ ----------- ---------- ------------------------- ------
            1          1          123         777          1 NEW|A/C COMPRESSOR KIT         N
            1          2          123         777          2 REMAN|A/C LINE                 N
            1          3          123         777          1 TEST NOTE                      N
    */
    
    
    DECLARE
       v_note2 varchar2(255) := 'NEW' ;
    BEGIN
    UPDATE tab1 t 
             SET 
              , t.notes =  (select REPLACE(t.notes,v_note2,null) 
                            from dual )
          WHERE t.file_id = 1         -- value comes from another source
          AND   t.part_type_id = 123  -- value comes from another source
          AND   t.part_number = 777   -- value comes from another source
          AND   t.position_id = 1  ;  -- value comes from another source
    END ;
    /
    
    ERROR at line 3:
    ORA-01747: invalid user.table.column, table.column, or column specification
    

    Here's what the end result should be:

      FILE_ID  RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID NOTES                     MAPPED
    --------- ---------- ------------ ----------- ---------- ------------------------- ------
            1          1          123         777          1 |A/C COMPRESSOR KIT            N
            1          2          123         777          2 REMAN|A/C LINE                 N
            1          3          123         777          1 TEST NOTE                      N
    

    Hello

    orclrunner wrote:

    Oracle 11g Release 2

    I run an UPDATE statement. In the 'set' I am trying to update a column by using a subquery on the right side. REPLACE the statement Gets the error ORA-01747: specification of invalid column, table.column, or user.table.column.

    1. create table tab1
    2. (file_id number,
    3. number of record_id,
    4. number of part_type_id
    5. number of PART_NUMBER,
    6. number of positon_id
    7. Notes VARCHAR2 (255),
    8. mapped by default varchar2 (1) ' don't
    9. )
    10. /
    11. insert into tab1 values (1,1,123,777,1,'NEW |) Kit COMPRESSOR / it, ' don't);
    12. insert into tab1 values (1,2,123,777,2,'REMAN |) A/C LINE ',' don't);
    13. insert into tab1 values (1,3,123,777,2, 'NOTE of TEST', ' don't);
    14. commit;
    15. Select * from tab1;
    16. /*
    17. FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID MAPPED NOTES
    18. --------- ---------- ------------ ----------- ---------- ------------------------- ------
    19. 1 1 123 777 1 NEW | A/C COMPRESSOR KIT N
    20. 1 2 123 777 2 REMAN | A/C LINE N
    21. 1 3 123 777 1 TEST NOTES N
    22. */
    23. DECLARE
    24. VARCHAR2 (255) v_note2: = "NEW";
    25. BEGIN
    26. Tab1 t UPDATE
    27. SET
    28. t.notes = (select REPLACE(t.notes,v_note2,null)
    29. the double)
    30. WHERE t.file_id = 1 - value comes from another source
    31. AND t.part_type_id = 123 - value comes from another source
    32. AND t.part_number = 777 - value comes from another source
    33. AND t.position_id = 1;  -value comes from another source
    34. END;
    35. /
    36. ERROR at line 3:
    37. ORA-01747: invalid column, table.column, or user.table.column specification

    Here's what the end result should be:

    1. FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID MAPPED NOTES
    2. --------- ---------- ------------ ----------- ---------- ------------------------- ------
    3. 1          1          123         777          1 | A/C COMPRESSOR KIT N
    4. 1 2 123 777 2 REMAN | A/C LINE N
    5. 1 3 123 777 1 TEST NOTES N

    The comma after SET is a syntax error.

    Why you use double?  Why not just

    UPDATE tab1

    SET of notes = REPLACE (notes, v_note2)

    WHERE file_id = 1

    ...

    ?

  • Error in ODI, ORA-01747: invalid column, table.column, or user.table.column specification

    ODI-1227: SrcSet0 (load) task fails on the source of ORACLE STAGING_YYY connection.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-01747: invalid column, table.column, or user.table.column specification

    We get the above error whenever we run an ODI interface,
    This interface is straight forrwad a mapping update incremental IKM Oracle, although we have identified the problem but do not know how it could be fixed

    Source table that contains two columns that are generally identified as the key of DB

    NAME

    / / DESC

    the target too has the same columns. If we disable these mappings to columns from the Active maps the interface works very well, however, with the latter, it fails. We will not be able to change the name of the column in the target because it is a table of Oracle products and has several dependencies to the breast.

    Please suggest an alternative and also if our understanding is correct.

    Thanks in advance.

    Jay

    HI Jay

    change the column as DESC and put "DESC" in the name, and save it for all the source concerned target and remapping to remove the column from the interface

    Thank you

    P

  • Error Type 2 SCD: ODI - 1228:ORA - 01747: invalid column, table.column, or user.table.column specification

    ODI error. When you try to import.

    Error Type 2 SCD: ODI - 1228:ORA - 01747: invalid column, table.column, or user.table.column specification

    It is a common question.

    Allow your SCD SCD table column properties if you do not select "crush on change."
    This property simply

    -Online CPC IKM goto => select ignore option error on update of existing lines.

  • PL/SQL: ORA-01747... trigger?

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

    PL/SQL Release 11.2.0.3.0 - Production

    CORE Production 11.2.0.3.0

    AMT for Solaris: 11.2.0.3.0 - Production Version

    NLSRTL Version 11.2.0.3.0 - Production

    I create instead of relaxing and it is to compile with error and gives me the error of:

    PL/SQL: ORA-01747: invalid column, table.column, or user.table.column specification

    I compared the columns all the way back to the original table and I can't choose where or it fails on.

    Here is the original table:

    DROP TABLE NRIS_WBETTERS. NRN_TOTAL_SUMMARY CASCADE CONSTRAINTS;

    CREATE THE TABLE NRIS_WBETTERS. NRN_TOTAL_SUMMARY

    (

    Sys_guid() TOTAL_CN VARCHAR2 (40 BYTE) DEFAULT is NOT NULL.

    ROUND NUMBER (3) NOT NULL,

    REGION_CODE VARCHAR2 (5 BYTE) NOT NULL,

    AFOREST_CODE VARCHAR2 (15 BYTE) NOT NULL,

    SUBUNIT VARCHAR2 (15 BYTE),

    TYPESITE VARCHAR2 (15 BYTE) NOT NULL,

    SAMP_STRATUM VARCHAR2 (6 BYTE) NOT NULL,

    SAMPLEYEAR VARCHAR2 (5 BYTE) NOT NULL,

    SAMPLED_DAYS NUMBER (3).

    AGREEDTO NUMBER 4,

    LERNUM NUMBER 4,

    NNH NUMBER (8).

    SITE_VISITS NUMBER (10),

    SVPERDAY NUMBER (8,1).

    DAYSNOINTS NUMBER 4,

    DAYSNOLER NUMBER 4,

    LERPERDAY NUMBER (4.1).

    SVCONFINT NUMBER (5.1).

    LAST_UPDATE DATE DEFAULT sysdate is NOT NULL,

    VPDUNIT_ID VARCHAR2 (10 BYTE) NOT NULL

    )

    TABLESPACE USERS

    PCTUSED 0

    PCTFREE 10

    INITRANS 1

    MAXTRANS 255

    STORAGE)

    80K INITIAL

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    )

    LOGGING

    NOCOMPRESS

    NOCACHE

    NOPARALLEL

    MONITORING;

    GRANT SELECT, UPDATE ON NRIS_WBETTERS. NRN_TOTAL_SUMMARY TO TEMP_NVUM_FY;

    Here is the view that the trigger is activated on:

    DROP VIEW NVUM_FY. NRN_TOTAL_SUMMARY_V;

    / * Formatted on 14/03/2014 07:47:04 (PS5 v5.256.13226.35538) * /.

    CREATE OR REPLACE FORCE VIEW NVUM_FY. NRN_TOTAL_SUMMARY_V

    (

    TOTAL_CN,

    ID,

    AFOREST_CODE,

    SUBUNIT,

    TYPESITE,

    SAMP_STRATUM,

    SAMPLED_DAYS,

    AGREEDTO,

    LERNUM,

    NNH,

    DAYSNOINTS,

    DAYSNOLER,

    LERPERDAY,

    SVCONFINT,

    SITE_VISITS,

    SVPERDAY

    )

    AS

    (SELECT 'TOTAL_CN',

    "ID."

    "AFOREST_CODE,"

    "SUBUNIT."

    "TYPESITE."

    "SAMP_STRATUM,"

    "SAMPLED_DAYS,"

    "AGREEDTO."

    "LERNUM,"

    "NNH."

    "DAYSNOINTS,"

    "DAYSNOLER,"

    "LERPERDAY,"

    "SVCONFINT,"

    "SITE_VISITS,"

    'SVPERDAY '.

    OF NRIS_WBETTERS. FY07_RECONCILED_TOTAL_SUMMARY);

    CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II

    INSTEAD OF UPDATE

    ON NVUM_FY.nrn_total_summary_v

    FOR EACH LINE

    BEGIN

    UPDATE nris_wbetters.nrn_total_summary

    SET SAMP_STRATUM =: NEW. SAMP_STRATUM,

    SAMPLED_DAYS =: NEW. SAMPLED_DAYS,

    AGREEDTO =: NEW. AGREEDTO,

    LERNUM =: NEW. LERNUM,

    LONG =: NEW. ROUND,

    REGION_CODE =: NEW. REGION_CODE,

    NNH =: NEW. NNH,

    DAYSNOINTS =: NEW. DAYSNOINTS,

    DAYSNOLER =: NEW. DAYSNOLER,

    LERPERDAY =: NEW. LERPERDAY,

    SVCONFINT =: NEW. SVCONFINT,

    SITE_VISITS =: NEW. SITE_VISITS,

    SVPERDAY =: NEW. SVPERDAY,

    SAMPLEYEAR =: NEW. SAMPLEYEAR,

    WHERE total_cn =: NEW.total_cn

    AND aforest_code =: NEW.aforest_code

    AND sitenumber =: NEW.sitenumber

    AND TypeSite =: NEW.sitetype;

    END nrn_proxy_summary_ii;

    /

    And here's the trigger.

    DROP TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II;

    CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II

    INSTEAD OF UPDATE

    ON NVUM_FY.nrn_total_summary_v

    FOR EACH LINE

    BEGIN

    UPDATE nris_wbetters.nrn_total_summary

    SET SAMP_STRATUM =: NEW. SAMP_STRATUM,

    SAMPLED_DAYS =: NEW. SAMPLED_DAYS,

    AGREEDTO =: NEW. AGREEDTO,

    LERNUM =: NEW. LERNUM,

    NNH =: NEW. NNH,

    DAYSNOINTS =: NEW. DAYSNOINTS,

    DAYSNOLER =: NEW. DAYSNOLER,

    LERPERDAY =: NEW. LERPERDAY,

    SVCONFINT =: NEW. SVCONFINT,

    SITE_VISITS =: NEW. SITE_VISITS,

    SVPERDAY =: NEW. SVPERDAY,

    WHERE TOTAL_CN =: NEW. TOTAL_CN

    AND AFOREST_CODE =: NEW. AFOREST_CODE

    AND TYPESITE =: NEW. TYPESITE;

    END;

    /

    In relaxation, the line that is highlighted when the script ends is the clause WHERE of TOTAL_CN.  I know not true but if it is a false witness or what, but I could not figure out where the error is or why.

    Is anyone able to see what I can't do?

    Thank you.

    Hello

    LostInPermuation wrote:

    ...
    CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II

    INSTEAD OF UPDATE

    ON NVUM_FY.nrn_total_summary_v

    FOR EACH LINE

    BEGIN

    UPDATE nris_wbetters.nrn_total_summary

    SET SAMP_STRATUM =: NEW. SAMP_STRATUM,

    SAMPLED_DAYS =: NEW. SAMPLED_DAYS,

    AGREEDTO =: NEW. AGREEDTO,

    LERNUM =: NEW. LERNUM,

    LONG =: NEW. ROUND,

    REGION_CODE =: NEW. REGION_CODE,

    NNH =: NEW. NNH,

    DAYSNOINTS =: NEW. DAYSNOINTS,

    DAYSNOLER =: NEW. DAYSNOLER,

    LERPERDAY =: NEW. LERPERDAY,

    SVCONFINT =: NEW. SVCONFINT,

    SITE_VISITS =: NEW. SITE_VISITS,

    SVPERDAY =: NEW. SVPERDAY,

    SAMPLEYEAR =: NEW. SAMPLEYEAR,

    WHERE total_cn =: NEW.total_cn

    AND aforest_code =: NEW.aforest_code

    AND sitenumber =: NEW.sitenumber

    AND TypeSite =: NEW.sitetype;

    END nrn_proxy_summary_ii;

    /

    And here's the trigger.

    DROP TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II;

    CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II

    INSTEAD OF UPDATE

    ON NVUM_FY.nrn_total_summary_v

    FOR EACH LINE

    BEGIN

    UPDATE nris_wbetters.nrn_total_summary

    SET SAMP_STRATUM =: NEW. SAMP_STRATUM,

    SAMPLED_DAYS =: NEW. SAMPLED_DAYS,

    AGREEDTO =: NEW. AGREEDTO,

    LERNUM =: NEW. LERNUM,

    NNH =: NEW. NNH,

    DAYSNOINTS =: NEW. DAYSNOINTS,

    DAYSNOLER =: NEW. DAYSNOLER,

    LERPERDAY =: NEW. LERPERDAY,

    SVCONFINT =: NEW. SVCONFINT,

    SITE_VISITS =: NEW. SITE_VISITS,

    SVPERDAY =: NEW. SVPERDAY,

    WHERE TOTAL_CN =: NEW. TOTAL_CN

    AND AFOREST_CODE =: NEW. AFOREST_CODE

    AND TYPESITE =: NEW. TYPESITE;

    END;

    /

    In relaxation, the line that is highlighted when the script ends is the clause WHERE of TOTAL_CN.  I know not true but if it is a false witness or what, but I could not figure out where the error is or why.

    Is anyone able to see what I can't do?

    Thank you.

    You don't want the last comma just before the keyword WHERE.

    I get an error of re-creation of the view, so I can't say if there are problems.

  • [SQL * Loader] ORA-01747 on column name 'INDEX '.

    Hello

    I use SQL * Loader to load the test data for the CSV files. I have a column whose name is "INDEX". SQL * Loader works very well under Linux (Red Hat 6 - Client Oracle 11.2.0.1.0) but I encounter ORA-01747 launch my Workstation Windows (Oracle Server 11.2.0.1.0).

    For more information, I target the same instance (Red Hat 6 - Oracle Server 11.2.0.1.0).

    You have an idea how to solve the problem (without renaming the column )?

    Thanks for any help you can provide.

    I finally find the solution surrounding the column name with double quotes ("") within the control file. Thank you to remember the format of "protector".

  • MERGER into slider throws the error message: ORA-01747

    Hi guys,.
    I'm new in PL/SQL and I'm taking the last row of a database table and add the same data in another table with the same structure, but for the ancestors of the current employee. Something like:

    Day EmpID LOB (key fields)
    12-1007-29

    EmpID has 24 and 95 ancestors. That's why in the destination table I have to insert (or update of status and idforum if these three key areas already exists):

    EmpID LOB day
    24 1007 29
    95-1007-29


    There are 4 tables:

    X - table base;
    Y - destination table (same structure as X);
    Z - the relationship between the employee and ancestor;
    W - plays the role of a temporary table, but is a real table - only for the MERGER;
    ============================================================================================
    create or replace
    PROCEDURE INSERT_PARENTS AS
    BEGIN

    DECLARE
    EMP_VAR NUMBER (38.0). -employee
    NUMBER OF ANCESTOR_ID; -relative of the employee
    NUMBER OF LOB_VAR; -LOB
    NUMBER OF DAY_VAR; -date of
    NUMBER OF FORUMID_VAR; -Idforum
    STATUS_VAR VARCHAR2 (20); -Status
    Parents of CURSOR
    IS
    SELECT ancestor_key FROM Z WHERE member_key = EMP_VAR; -This slider will go through all the ancestors of the employee

    Number EMPROWID_VAR; -It's the key to the table Y (destination table)

    BEGIN
    -extract the last line of the table of database variables

    SELECT EMPL_KEY in the EMP_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
    SELECT LOB_KEY in the LOB_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
    SELECT DAY_KEY in the DAY_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
    SELECT IDFORUM in FORUMID_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
    SELECT STATUS in STATUS_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);

    SELECT NVL (Max (EMPROW_ID), 0) + 1 in EMPROWID_VAR OF Y; -initialize the key to the table max + 1 of the existing key Y


    Parents OPEN.

    LOOP
    EXTRACT the parents in ANCESTOR_ID;

    EXIT WHEN parents % NOTFOUND;

    EMPROWID_VAR: = EMPROWID_VAR + 1;
    -the value of the new key for Y
    INSERT w (emprowid_var, lob_var, ancestor_id, day_var, forumid_var, status_var)
    VALUES (EMPROWID_VAR, LOB_VAR, ANCESTOR_ID, DAY_VAR, FORUMID_VAR, STATUS_VAR); -prepare the source for the MERGE statement


    -merge data between 2 tables:
    -If a parent already exists in the destination, to update just idforum and the new status
    -If that parent does not exist in the dest table, will be inserted with the status ' U/R '.

    MERGE TO Y Dest
    USING the W
    WE (Dest.LOB_KEY = Surce.LOB_VAR AND)
    Dest.EMPL_KEY = Surce.ANCESTOR_ID AND
    Dest.DAY_KEY = Surce.DAY_VAR)

    WHEN MATCHED, THEN update to SET (Dest.FORUMID = Surce.FORUMID_VAR,
    Dest.STATUS = Surce.STATUS_VAR)

    WHEN NOT MATCHED THEN INSERT (Dest.EMPROW_ID, Dest.LOB_KEY, Dest.EMPL_KEY, Dest.DAY_KEY, Dest.FORUMID, Dest.STATUS)
    VALUES (Surce.EMPROWID_VAR, Surce.LOB_VAR, Surce.ANCESTOR_ID, Surce.DAY_VAR, Surce.FORUMID_VAR, ' U/R');

    END LOOP;
    END;

    END INSERT_PARENTS;

    When I try to run this procedure (compile) I get this error message:

    Error (53,37): PL/SQL: ORA-01747: invalid column, table.column, or user.table.column specification

    Can you tell me where I am doing wrong? (I'm pretty sure that it's in the Merge statement, but what is it?)

    Thanks in advance.

    Published by: petresion on November 19, 2011 14:02

    without the paintings I never would have found

    MERGE INTO y dest
    USING w surce
    ON (dest.lob_key = surce.lob_var AND dest.empl_key = surce.ancestor_id AND
    dest.day_key = surce.day_var )
    WHEN matched THEN
      UPDATE SET dest.forumid = surce.forumid_var,
                 dest.status = surce.status_var
    WHEN NOT matched THEN
      INSERT ( dest.emprow_id,
               dest.lob_key,
               dest.empl_key,
               dest.day_key,
               dest.forumid,
               dest.status)
      VALUES ( surce.emprowid_var,
               surce.lob_var,
               surce.ancestor_id,
               surce.day_var,
               surce.forumid_var,
               'U/R');
    
  • Why this error ORA-01747: invalid user.table.column, table.column or colu

    Hello

    Run immediately is to give different results
    SQL>  declare
      2   v varchar2(30):='SAL';
      3   Begin
      4   execute immediate 'update emp set :1=1000 where empno=7900' using v;
      5   end;
      6   /
     declare
    *
    ERROR at line 1:
    ORA-01747: invalid user.table.column, table.column, or column specification
    ORA-06512: at line 4
    But,
    SQL> declare
      2  v varchar2(30):='SAL';
      3  Begin
      4  execute immediate 'update emp set ' ||v||'=1000 where empno=7900';
      5  end;
      6  /
    old 7900 new 7900
    
    PL/SQL procedure successfully completed.
    Can someone kindly explain to me the reason.

    I need to accomplish a task using the first way.

    What could be the solution to the above ORA error?

    Thank you

    Column names cannot be used as a bind variable.
    If you do not need to do this using method 1 as method 1 does not work by design.
    On the other hand, you need replace the literal (7500,7900) with a variable binding.

    --------
    Sybrand Bakker
    Senior Oracle DBA

  • ORA-01747: Oracle reserved words

    Hello gurus,

    I have a problem with words reserved for Oracle, one of the applications is by using table that has the column NUMBER. I'm not able to query this table corresponding to the database with a column for the NUMBER.

    HERE
    select a.*
    from DOC a , FOLDER B
    where a.NUMBER= B.INCIDENT_ID
    and b.open = 'Closed';
    I tried the double quotes ("'") and sigle quote also, none of them worked.

    Any help much appreciated. Thank you.

    >
    SQL error: ORA-00904: "A." "' number ': invalid identifier
    >
    This means that by using double quotes RESOLVED your original problem and now the problem is that you do not have a column with the name in lowercase 'number '.

    If you query all_tab_cols you see what really is the name of the column. You must use the name exactly as it appears in that discovers and surround it with double quotes.

  • Case statement in the process Page

    Request Express 3.2.1.00.11

    I put the following code in an anonymous block (will return no error) for a process Page;

    BEGIN
    INSERT
      INTO DAD_ASSESSMENT_REQUEST
    ( tenure_id
    , client_id
    )
    VALUES
    ( :P10101_TENURE_ID
    , :P10101_CLIENT_ID 
    );
    END;
    

    But when I put a statement case it throws the following error;

    1 error has occurred
    ORA-06550: line 7, column 3: PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification ORA-06550: line 3, column 1: PL/SQL: SQL Statement ignored
    

    BEGIN
    INSERT
      INTO DAD_ASSESSMENT_REQUEST
    ( tenure_id
    , client_id
    , (CASE 
       WHEN (:P10101_MEASURE_OPTION = 'AREA') THEN estimated_area_ha 
       WHEN (:P10101_MEASURE_OPTION = 'LINE') THEN estimated_length_km 
     END)
    )
    VALUES
    ( :P10101_TENURE_ID
    , :P10101_CLIENT_ID 
    , :P10101_X
    );
    END;
    

    Why is this code not work and it is possible to use a case statement in a Page Apex process

    Concerning

    Ben

    Benton says:

    Request Express 3.2.1.00.11

    I put the following code in an anonymous block (will return no error) for a process Page;

    1. BEGIN
    2. INSERT
    3. IN DAD_ASSESSMENT_REQUEST
    4. (tenure_id
    5. client_id
    6. )
    7. VALUES
    8. (: P10101_TENURE_ID)
    9. ,: P10101_CLIENT_ID
    10. );
    11. END;

    But when I put a statement case it throws the following error;

    1. 1 error has occurred
    2. ORA-06550: line 7, column 3: PL/SQL: ORA-01747: specification user.table.column, table.column or invalid column ORA-06550: line 3, column 1: PL/SQL: statement ignored
    1. BEGIN
    2. INSERT
    3. IN DAD_ASSESSMENT_REQUEST
    4. (tenure_id
    5. client_id
    6. (CASE
    7. WHEN (: P10101_MEASURE_OPTION = 'SPACE') THEN estimated_area_ha
    8. WHEN (: P10101_MEASURE_OPTION = 'LINE') THEN estimated_length_km
    9. END)
    10. )
    11. VALUES
    12. (: P10101_TENURE_ID)
    13. ,: P10101_CLIENT_ID
    14. ,: P10101_X
    15. );
    16. END;

    Why is this code not work and it is possible to use a case statement in a Page Apex process

    Of course, it is possible to use a CASE statement or expression (it is the latter) in a page APEX process. However, it is not possible to use an invalid syntax while doing so. Part of a clause INSERT INTO can contain only static column names.

    In general the SQL expressions (and also the bind variable, another cause frequent errors of syntax) can be used only in

    • the projections of the SELECT queries and subqueries
    • the right side of the disposals in the SET update clause
    • the lists of VALUES of INSERTs
    • WHERE clause predicates

    ReemaPuri wrote:

    Try this

    INSERT

    IN DAD_ASSESSMENT_REQUEST

    (tenure_id

    client_id

    estimated_area_ha

    estimated_length_km

    )

    VALUES

    (: P10101_TENURE_ID)

    ,: P10101_CLIENT_ID

    , (SELECT CASE WHEN: P10101_MEASURE_OPTION = 'SPACE' AND THEN: P10101_X)

    OTHERWISE, NULL END OF DOUBLE)

    , (SELECT CASE WHEN: P10101_MEASURE_OPTION = 'LINE' THEN: P10101_X)

    OTHERWISE, NULL END OF DOUBLE)

    );

    It's a good idea, but it can be simplified, eliminating unnecessary subqueries:

    insert into dad_assessment_request (
        tenure_id
      , client_id
      , estimated_area_ha
      , estimated_length_km)
    values (
        :p10101_tenure_id
      , :p10101_client_id
      , case
          when :p10101_measure_option = 'AREA' then :p10101_x
        end
      , case
          when :p10101_measure_option = 'LINE' then :p10101_x
        end);
    
  • Exception in the reconciliation of the target

    Hi Experts,

    Everything by making reconciliation target through a recon Planner personalized, I saw the exception.

    Thor.API.Exceptions.tcAPIException: An exception occurred: oracle.iam.platform.utils.SuperRuntimeException: error in XL_SP_RECONEVALUATEACCOUNT while no. 1223 processing error event occurred in XL_SP_RECONUSERMATCH during the event processing N° 1223 ORA-01747: invalid column, table.column, or user.table.column specification

    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)

    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)

    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)

    at oracle.iam.reconciliation.api.ReconOperationsService_emc07d_ReconOperationsServiceRemoteImpl_1036_WLStub.processReconciliationEventx (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)

    to com.sun.proxy. $Proxy2.processReconciliationEventx (unknown Source)

    at oracle.iam.reconciliation.api.ReconOperationsServiceDelegate.processReconciliationEvent (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    to Thor.API.Base.SecurityInvocationHandler$ 1.run(SecurityInvocationHandler.java:68)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.security.Security.runAs(Security.java:41)

    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs (weblogicLoginSession.java:52)

    at Thor.API.Base.SecurityInvocationHandler.invoke (SecurityInvocationHandler.java:79)

    to com.sun.proxy. $Proxy3.processReconciliationEvent (unknown Source)

    at com.scb.scheduler.recon.SLTargetRecon.performRecon(SLTargetRecon.java:281)

    at com.scb.scheduler.recon.SLTargetRecon.execute(SLTargetRecon.java:105)

    at com.scb.scheduler.recon.SLTargetRecon.main(SLTargetRecon.java:553)

    But to my surprise it worked very well just a week back. And the exception is thrown only when the account is not provisioned for the user. But when the user is already having the account process match happens successfully.

    Here is the history of events-

    Looking to the wrong procedure. This is "XL_SP_RECONUSERMATCH". Not "XL_SP_RECON_USR_MATCH".

  • SQL code - call a column that has a reserved as the name keyword

    Hi all

    As seen in the title, one of the tables in the database that I am trying to extract information from one of its columns is a reserved keyword.

    I am trying to run SQL on Oracle SQL Developer test code.

    The simple code, I'm running is:

    Select number

    of specific_table

    As a result:

    ORA-01747: invalid column, table.column, or user.table.column specification

    01747 00000 - "invalid user.table.column, table.column or column specification.

    Is there some sort of way to get around this?
    Any help would be greatly appreciated.

    Thank you!

    Yes, use the names in quotes:

    SQL > create table tbl (number)
    2.
    create the table tbl (number, number)
    *
    ERROR on line 1:
    ORA-00904: invalid identifier

    SQL > create table tbl ("number")
    2.

    Table created.

    SQL > insert
    2 tbl
    3 values (1)
    4.

    1 line of creation.

    SQL > select number
    2 tbl
    3.
    Select number
    *
    ERROR on line 1:
    ORA-00936: lack of expression

    SQL > select "number".
    2 tbl
    3.

    number
    ----------
    1

    SQL >

    SY.

    PS you need to find the EXACT (creating) the spelling of the column name. Use the DESC or select XXX_TAB_COLUMNS.

  • Pass a rowtype to a function in sql

    Hi all

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0

    Can you please tell me if the following is possible:

    I have a function that takes a rowtype as one of the parameters and returns a varchar2
    function test( pa_text in varchar2,
                   pa_emp  in employee%rowtype 
      ) return varchar2
    I was hoping that I could use this feature in an implicit cursor, something like
    begin
      for c in ( select d.deptno
                 ,      test(d.deptno, e.*) test
                 from   emp  e
                 ,      dept d
                 where  e.deptno = d.deptno )
      loop
        ...
      end loop;
    end;
    But this translates
    Error: PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification
    Is something like this even possible?

    Thank you!

    Rob

    What you could do:

    declare
        v_deptno dept.deptno%type;
        v_dcur sys_refcursor;
        v_ecur sys_refcursor;
        v_emp emp%rowtype;
    begin
        open v_dcur for select  d.deptno,
                                cursor(
                                       select  e.*
                                         from  emp e
                                         where e.deptno = d.deptno
                                      ) e
                          from  dept d;
        loop
          fetch v_dcur
            into v_deptno,
                 v_ecur;
            exit when v_dcur%notfound;
          loop
            fetch v_ecur
              into v_emp;
            exit when v_ecur%notfound;
            test(v_deptno,v_emp);
          end loop;
          close v_ecur;
        end loop;
        close v_dcur;
    end;
    /
    

    For example:

    SQL> create or replace
      2    function test(
      3                  pa_text in varchar2,
      4                  pa_emp  in emp%rowtype
      5                 )
      6      return varchar2
      7      is
      8      begin
      9          return 'DEPTNO = ' || pa_text || ' ENAME = ' || pa_emp.ename;
     10  end;
     11  /
    
    Function created.
    
    SQL> set serveroutput on
    SQL> declare
      2      v_deptno dept.deptno%type;
      3      v_dcur sys_refcursor;
      4      v_ecur sys_refcursor;
      5      v_emp emp%rowtype;
      6  begin
      7      open v_dcur for select  d.deptno,
      8                              cursor(
      9                                     select  e.*
     10                                       from  emp e
     11                                       where e.deptno = d.deptno
     12                                    ) e
     13                        from  dept d;
     14      loop
     15        fetch v_dcur
     16          into v_deptno,
     17               v_ecur;
     18          exit when v_dcur%notfound;
     19        loop
     20          fetch v_ecur
     21            into v_emp;
     22          exit when v_ecur%notfound;
     23          dbms_output.put_line(test(v_deptno,v_emp));
     24        end loop;
     25        close v_ecur;
     26      end loop;
     27      close v_dcur;
     28  end;
     29  /
    DEPTNO = 10 ENAME = CLARK
    DEPTNO = 10 ENAME = KING
    DEPTNO = 10 ENAME = MILLER
    DEPTNO = 20 ENAME = SMITH
    DEPTNO = 20 ENAME = JONES
    DEPTNO = 20 ENAME = SCOTT
    DEPTNO = 20 ENAME = ADAMS
    DEPTNO = 20 ENAME = FORD
    DEPTNO = 30 ENAME = ALLEN
    DEPTNO = 30 ENAME = WARD
    DEPTNO = 30 ENAME = MARTIN
    DEPTNO = 30 ENAME = BLAKE
    DEPTNO = 30 ENAME = TURNER
    DEPTNO = 30 ENAME = JAMES
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

  • Insert a number with «,»

    Hello people

    I'm trying to update to the help to run immediately. but when I update, I got ORA-01747 and I know why:

    My values are with ',' as 13,2345 then I get the string to update (OUTPUT of DBMS):

    UPDATE TF_MEDIA_PPM SET DW_LAST_UPD = SYSDATE, MEDIA_PPM_ATRIBUTO =, 2001004, TRES_SIGMA_ATRIBUTO = 4087381, SEIS_SIGMA_ATRIBUTO = 6173758 WHERE MEDIA_PPM_SEQ = 7145432

    And the ',' causing the error...

    How can I solve this? someone has an idea?

    Thnks

    Hello

    In digital liteals, period ('.) ') is the decimal indicator, no comma «,» Try this:

    UPDATE  TF_MEDIA_PPM
    SET      DW_LAST_UPD          = SYSDATE
    ,      MEDIA_PPM_ATRIBUTO      = .2001004
    ,      TRES_SIGMA_ATRIBUTO     = .4087381
    ,      SEIS_SIGMA_ATRIBUTO     = .6173758
    WHERE      MEDIA_PPM_SEQ      = 7145432
    ;
    

    This is regardless of your NLS parameters. A number can automatically display as 2001004, but you will need to enter under the forme.2001004.

  • Problem in IMMEDIATE EXECUTION

    I need to update some columns in a table.
    But the columns are dynamic. I can update 1, 20r 3 or more columns of this table.

    I tried running with the Execute immediate statement.
    But I get the error message (ORA-01747)

    : 1(below in code) contains the name of the column with the values. (Example:Column2 = Column2.value, Column3 = Column3.value)
    There may be more than 3 or more columns to be updated.
    CREATE OR REPLACE PROCEDURE PR_Bulk_CA(pn_SSCA_ID_VARRAY          BULK_UPDATE_CA_VARRAY
                                          ,pv_set_string              Varchar2
                                          ,pn_success                 OUT number
                                          )    
                                          Is
     sql_stmt  VARCHAR2(32000);
    
    BEGIN
         
    sql_stmt:= 'update table_A
                   SET :1
               WHERE  ID IN (select ID from table_A ca
                       where  ca.status in (20700,20710,20720)
                         and  ca.id in (select * from table(:2)))';
    
    EXECUTE IMMEDIATE sql_stmt USING pv_set_string,pn_SSCA_ID_VARRAY;                      
    
    COMMIT;
                     
    pn_success:=0;
    
    EXCEPTION
        WHEN OTHERS THEN
    
    pn_success:=-1;
    
    END PR_Bulk_CA;

    You can't pass the name of the column as a bind variable.

    Replace your code (passing only the varray as a bind variable):

    sql_stmt:= 'update table_A
                   SET ' || pv_set_string || '
               WHERE  ID IN (select ID from table_A ca
                       where  ca.status in (20700,20710,20720)
                         and  ca.id in (select * from table(:1)))';
    

    HTH

Maybe you are looking for

  • OTG not recognized by iPhone device

    I use iPhone 6 s. so I bought the key USB OTG NK890 (32 GB) model. This device works correctly with i-FlashDevice until recently. but now, it is not recognized by my iPhone. He'll show a massage error as shown in the picture. Pls comment what is the

  • MSIMN.exe is missing from the Outlook Express folder. I have XP SP3 and IE 8.

    MSIMN.exe is missing from the Outlook Express folder which has 11 files it contains.  OE has never been installed.   I have XP Pro SP 3 IE 8. I bought a Dell 5 years computer and it works well. I have no e-mail program, and none has ever been install

  • Cannot lock my network.

    I recently added a router to my computer for my smartphone Wireless WiFi connection. IM connected but the only problem is that I can't lock my network. Its opening to the public and its something I'm not comfortable with. All other connections has a

  • Good way to configure "never block addresses?

    ID 4210 2.0000 S47 PIX 515 v6.2 (2) What is the proper way to 'never block' a whole network in IDM? The network behind the firewall with a private IP address range (10.10.10.1 - 254, for example) it's NAT would have on the external interface of the P

  • Transfer, copy of your upgrade to windows 7 during the upgrade of your computer.

    Hi, I'm just upgrading my computer (upgrade everything except for the cases and GPU) and was wondering what would be the case with tranfering windows 7. On my current computer (upgraded) I've upgraded to windows 7 from XP is about 2 years. So my ques