Number of error SQL ORA-00904: invalid column name has occurred.

Hello
on P8.18 on a Win 2003 server when we launch SWPAUDIT, it failed with:
Number of error SQL ORA-00904: invalid column name has occurred. Query process failed.
I searched this error on metalink3. Nothing in connection with.

Any idea?

Thank you.

Please give a clear picture of what you are doing... .and what paintings... There is the possibility of the audit refers to certain tables... with deleted. names of columns just look in the structure of what you audit?

Please, find the name of column...

ORA-00904: string: invalid identifier
Cause: The column name entered is invalid or missing.
Action: Enter a valid column name. A valid column name must start with a letter, must be less than or equal to 30 characters and include only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in quotation marks. It cannot be a reserved word.

Tags: Oracle Applications

Similar Questions

  • PL/SQL: ORA-00904: invalid identifier

    Hello

    Run the script after and encountered the error.

    SQL > create or replace FUNCTION p_CQTicketUsu

    () 2

    3 v_TicketUserID IN NUMBER by DEFAULT NULL,-it's the [CQTicketUsers]. TicketUserID generated on update

    4 v_TicketID IN NUMBER by DEFAULT NULL,-it's the [CQTicketUsers]. TicketID update

    5 v_AdminUserID IN NUMBER by DEFAULT NULL,-it's the [CQTicketUsers]. AdminUserID update

    6 v_TicketUserTypeID IN NUMBER by DEFAULT NULL - this is the [CQTicketUsers]. TicketUserTypeID update

    7)

    8 RETURN NUMBER

    9, ACCORDING TO

    10 v_sys_error NUMBER: = 0;

    11 v_ERRSQL NUMBER (10,0);

    12 v_UpdCount NUMBER (10,0);

    13

    BEGIN 14

    15

    16 UPDATE CQTicketUsers

    17 SET v_TicketUserID = TicketUserID,

    18 v_TicketID = TicketID,

    19 v_AdminUserID = AdminUserID,

    20 v_TicketUserTypeID = TicketUserTypeID

    21 WHERE TicketUserID = v_TicketUserID;

    22 v_ErrSQl: = v_sys_error;

    23 v_UpdCount: = SQL % ROWCOUNT;

    24 IF v_ErrSQL <>0 THEN

    25 RETURN-1;

    26 END IF;

    27 IF v_Updcount < 1 THEN

    28 RETURN - 2;

    29 END IF;

    30 RETURN 0;

    ENDS 31;

    32.

    WARNING: Function created with compilation errors.

    SQL > show error

    Errors for the P_CQTICKETUSU FUNCTION:

    16/4 PL/SQL: statement ignored

    20/11 PL/SQL: ORA-00904: "V_TICKETUSERTYPEID": invalid identifier

    Please note, I said v_TicketUserTypeID to the #6 line. Advice kindly.

    Kind regards

    Ballanger

    It's going to be kind of embarrassing, but you have the update parameters reversed. It should be

    TicketUserTypeID = v_TicketUserTypeID

    and is not

    v_TicketUserTypeID = TicketUserTypeID

    You get this error for database columns not only for pl/sql variables.

  • PL/SQL: ORA-00904 invalid identifier, PLS-00225: reference of the subprogram or cursor is out of reach

    Hi gurus,

    Your help is greatly appreciated.

    Will I have a fucntion where we have the object it contains.

    The changes that I have doen are: 2 new cusrosrs, but its failure with the error below.

    Highlighted are the changes I made. his length very well before your help is greatly appreciated.

    1) PL/SQL: ORA-00904: "GET_ACQ_ID.". ' ACQ_ID ': invalid identifier.

    (2) PLS-00225: subprogram or cursor reference 'GET_ACQ_ID' is out of range

    Here is the code:

    _________________________________________________________________________

    FUNCTION GET_IP_COMM_INFO return PROD. TERMINAL_IP_COMM_INFO_TAB IS

    vTer TER.ter_id%TYPE;
    vAPPL_ID TAC.appl_id%TYPE;
    vValue TSF.vALUE%TYPE;

    IP_COMM_INFO_LIST PROD. TERMINAL_IP_COMM_INFO_TAB: = PROD. TERMINAL_IP_COMM_INFO_TAB();

    CURSOR GET_ACQ_ID IS
    SELECT ACQ_ID
    TER TAHA, MERC M, PROF
    WHERE T.MER_ID = M.MER_ID
    AND M.PROFID = P.PROF_ID
    AND T.TER_ID = vTer_id;


    CURSOR GET_INFO_CURSOR IS
    SELECT H.DESCRIPTION AS HOST_DESCRIPTION
    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI
    WHERE (AICAI. HOST_ID = H.HOST_ID) and
    (AICAI. APPL_ID = vAPPL_ID);

    CURSOR GET_ACQ_CURSOR IS
    SELECT H.DESCRIPTION AS HOST_DESCRIPTION
    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI
    WHERE (AICAI. HOST_ID = H.HOST_ID) and
    (AICAI. APPL_ID = vAPPL_ID) AND
    (ACQUIRER_ID = GET_ACQ_ID. ACQ_ID);
    BEGIN

    vTer_id: = GLOBAL_VARIABLES.gv_ref_Ter_id;

    BEGIN
    SELECT the VALUE IN vvalue OF Tsf
    WHERE TER_id = vTEr_ID AND APPL_ID is vAPPL_ID and FEATURE_ID = 861;.

    Vvalue = '04' IF THEN
    For GET_ACQ_REC IN GET_ACQ_CURSOR
    LOOP
    IP_COMM_INFO_LIST. EXTEND;
    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);
    END LOOP;
    ON THE OTHER
    FOR GET_INFO_REC IN GET_INFO_CURSOR
    LOOP
    IP_COMM_INFO_LIST. EXTEND;
    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_INFO_REC. HOST_DESCRIPTION);
    END LOOP;
    END IF;

    RETURN IP_COMM_INFO_LIST;
    EXCEPTION WHEN OTHERS THEN
    LIFT;
    END GET_IP_COMM_INFO;

    ----------------------------------------------------------

    You try to access another variable of slider within the slider...

    CURSOR GET_ACQ_CURSOR IS

    SELECT H.DESCRIPTION AS HOST_DESCRIPTION

    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI

    WHERE (AICAI. HOST_ID = H.HOST_ID) and

    (AICAI. APPL_ID = vAPPL_ID) AND

    (ACQUIRER_ID = GET_ACQ_ID. ACQ_ID );

    But you have not opened this slider, or anything like that.

    You will probably need to pass as a parameter, just like a function:

    (not sure of the type of data, so I assumed that the NUMBER)

    CURSOR GET_ACQ_CURSOR (NUMBER in_acq_id) IS

    SELECT H.DESCRIPTION AS HOST_DESCRIPTION

    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI

    WHERE (AICAI. HOST_ID = H.HOST_ID) and

    (AICAI. APPL_ID = vAPPL_ID) AND

    (ACQUIRER_ID = in_acq_id );

    When you call this type, you must pass a value... So, it seems that you first call the other cursor.

    Change this code:

    IF Vvalue = ' 04 "THEN

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    ON THE OTHER

    To do this:

    IF Vvalue = ' 04 "THEN

    FOR GET_ACQ_ID_REC IN GET_ACQ_ID IS

    LOOP

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR (get_acq_id_rec.acq_id)

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    END LOOP;

    ON THE OTHER

    (Or something like that)

    I wasn't sure if your GET_ACQ_ID cursor returns only 1 row or not? If it returns more than 1 row, how to cope, you do not specify.

    If it's just 1 row, then you can probably simplify it a little more:

    IF Vvalue = ' 04 "THEN

    SELECT ACQ_ID

    in l_acq_id

    TER TAHA, MERC M, PROF

    WHERE T.MER_ID = M.MER_ID

    AND M.PROFID = P.PROF_ID

    AND T.TER_ID = vTer_id;

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR (l_acq_id)

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    ON THE OTHER

    Hope that helps.

  • PL/SQL: ORA-00904: invalid identifier (DG4ODBC 11.2.0.2 &amp; MySQL)

    I have a PL/SQL script, processing of information between Oracle and MySQL databases. My script runs perfectly with DG4ODBC 11.1.0.7. Then we went from Oracle 10.2.0 and 11.2.0.2 DG4ODBC. Now, if I run my script from command line Solaris love. / myscript.shl, I get the following errors:

    PL/SQL: ORA-00904: "cmswhit_moodle1." "" "" mdl_grade_grades "." finalgrade ": invalid identifier.

    PL/SQL: ORA-00904: "cmswhit_moodle1." "" "" mdl_question_states '. "the attempt": invalid identifier "

    The strange thing is that if I run the same query by cut and paste in sqlplus command line, the application works perfectly without any problems.

    What is the cause of this problem?

    Any help would be greatly appreciated.

    Jeffrey

    Hi Klaus,

    The problem has been resolved after I upgraded MySQL ODBC to a new version of 5.1.8 to 5.1.13.

    Summary of the problem and its solution:

    The problem: It seems that dg4odbc 11.2.0.2 requires a newer version of MyODBC. Previously, I used MyODBC 5.1.8, which ran into problems with dg4odbc 11.20.0.2.

    The Solution: After that I upgraded 5.1.13 MyODBC, my PL/SQL scripts all work.

    I need to point out that with that MyODBC 5.1.8, I can run queries and updates to SQL * more console, but now the PL/SQL scripts.

    I'm going to close this message.

    Once again, thank you and happy holidays.

    Jeffrey

  • IKM Partition Oracle Exchange Error loading - ORA-14006: invalid partition name

    Hello

    I use ODI Standalone Edition Version 11.1.1

    I've created an interface, the target table's partition.

    DDL script

    CREATE TABLE big_table2)

    ID NUMBER (10),

    CREATED_DATE DATE,

    lookup_id NUMBER (10),

    given VARCHAR2 (50)

    )

    PARTITION OF RANGE (created_date)

    (PARTITION big_table_2007 VALUES LESS THAN (MAXVALUE));

    the performance of the interface error: -.

    InternalCZ_SC_CONSULTINGjar:file:/D:/Oracle/middleware/Oracle_ODI1/oracledi/client/jdev/extensions/Oracle.ODI.Navigator.jar!/com/Sunopsis/graphical/gif/State/f_error.gif2015-01-28 10:58:38.02015-01-28 10:59:08.03014006ODI-1226: step INT_EXCH_PART fails after 1 attempt.

    ODI-1240: Flow INT_EXCH_PART fails during an operation of integration. This flow of charge table BIG_TABLE2 target.

    ODI-1228: failed INT_EXCH_PART (integration) task on the target of ORACLE ODI_STAGE connection.

    Caused by: java.sql.SQLException: ORA-14006: invalid partition name

    ORA-06512: at line 2

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1115)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3954)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1539)
    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)
    10000000000invalid partition error.JPG

    Please can I know what is the problem.

    Put your name of the partition in upper case and double coate as:

    'BIG_TABLE_2007 '.

    The capital should not be a problem, but it is better to be like that because it will store like this in the table USER or ALL_TAB_PARTITIONS.

    This makes it easier to compare if you need to check if a partition already exists or not.

    Hope this can help you.

  • error SQL ORA-00900: invalid SQL statement

    Hi all

    I'm new to sql and I'm trying to solve this problem, I have here.

    When I run this query (1) I get this message: ORA-00900: invalid SQL statement

    Query: 1


    WITH t1
    AS (SELECT CID,
    TYPE,
    TO_CHAR)
    TO_DATE (' 00:00:00 ', 'HH24:MI:SS')
    + (lg_end_time - lg_start_time).
    Call_time 'HH24:MI:SS'),
    ROW_NUMBER)
    COURSES (SORTING CID CID NULLS FIRST PARTITION)
    AS call_id1
    OF test_1
    )
    SELECT SUM (call_time)
    FROM t1;
    output:
    I get the error: ORA-01722: invalid number




    table structure:

    Select * form test_1;

    CID TYPE LG_END_TIME LG_START_TIME
    1508643 expedition 2012/12/03 14:05 2012/12/03 14:02
    1508643 treatment 2012/12/03 14:00 03/12/2012 14:00
    1508643 initiation 2012/12/03 14:00 03/12/2012 14:00
    1508662 expedition 2012/12/03 14:18 2012/12/03 14:16
    1508662 initiation 2012/12/03 14:01 03/12/2012 14:01
    1508662 treatment 2012/12/03 14:02 03/12/2012 14:01
    1508643 expedition 2012/12/03 14:02 03/12/2012 14:00
    1508662 expedition 2012/12/03 14:16 2012/12/03 14:02

    Thanks for your help

    I think this example might help.

    SQL> select decode(call_id1,99,null,cid)        cid,
      2         decode(call_id1,99,null,type)       type,
      3         decode(call_id1,99,null,to_char(call_time,'hh24:mi:ss'))  call_time,
      4         decode(call_id1,99,null,substr(call_id1,1,5))   call_id1,
      5         total_time
      6    from (select cid,
      7                 type,
      8                 call_time,
      9                 call_id1,
     10                 total_time
     11            from (select cid,
     12                         type,
     13                         call_time,
     14                         call_id1,
     15                         null total_time
     16                    from (SELECT CID ,
     17                                 TYPE,
     18                                 to_date(TO_CHAR (TO_DATE ('00:00:00', 'HH24:MI:SS') +
     19                                        (lg_end_time - lg_start_time),'HH24:MI:SS'),'HH24:MI:SS') call_time,
     20                                 ROW_NUMBER () OVER (PARTITION BY CID ORDER BY CID NULLS FIRST) AS call_id1
     21                            FROM test_1 ) t1
     22                  union all
     23                  select cid,
     24                         null type,
     25                         null call_time,
     26                         99   call_id1,
     27                         lpad(hours,2,'0')||':'||lpad(minutes,2,'0')||':'||lpad(seconds,2,'0') total_time
     28                    from (select cid,
     29                                 sum(to_number(to_char(call_time,'hh24'))) +
     30                                     trunc((sum(to_number(to_char(call_time,'mi'))) +
     31                                     (trunc(sum(to_number(to_char(call_time,'ss')))/60)))/24) hours,
     32                                 sum(to_number(to_char(call_time,'mi'))) +
     33                                    (trunc(sum(to_number(to_char(call_time,'ss')))/60)) minutes,
     34                                 (sum(to_number(to_char(call_time,'ss'))) -
     35                                     ((trunc(sum(to_number(to_char(call_time,'ss')))/60)) * 60)) seconds
     36                            from (SELECT CID ,
     37                                         TYPE,
     38                                         to_date(TO_CHAR (TO_DATE ('00:00:00', 'HH24:MI:SS') +
     39                                                (lg_end_time - lg_start_time),'HH24:MI:SS'),'HH24:MI:SS') call_time,
     40                                         ROW_NUMBER () OVER (PARTITION BY CID ORDER BY CID NULLS FIRST) AS call_id1
     41                                    FROM test_1 ) t1
     42                          group by cid) )
     43          order by cid, call_id1 );
    
    CID                                      TYPE                 CALL_TIME CALL_ID1 TOTAL_TIME
    ---------------------------------------- -------------------- --------- -------- ----------
    1508643                                  Dispatching          00:02:06  1
    1508643                                  Initiation           00:00:00  2
    1508643                                  Treatment            00:00:39  3
    1508643                                  Dispatching          00:02:50  4
                                                                                     00:05:35
    1508662                                  Treatment            00:01:03  1
    1508662                                  Initiation           00:00:00  2
    1508662                                  Dispatching          00:13:17  3
    1508662                                  Dispatching          00:02:43  4
                                                                                     00:17:03
    
    10 rows selected
    
    SQL> 
    
  • ORA 00904: invalid identifier "JAN".

    Hello

    I have the rest of the table.

    ===========================================

    create table ATT_ATTENDANCESHEET as

    (

    Select 1 empid, to_date('21/01/2014','dd/mm/yyyy') prdate, 240 reg, 0 unpaid all double union

    Select 2, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 200 reg, 0 unpaid all double union

    Select 3, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 240 reg, 0 unpaid all double union

    Select option 4, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 480 reg, 0 unpaid all double union

    Select 5, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 240 reg, unpaid double 0

    );

    =================================================

    I want to remove rows from table ATT_ATTENDANCESHEET.

    If the parameter passed empids, lines for employees would be eliminated.

    If empids is null, all records between the given period will be deleted.

    I created after the procedure to that effect.

    ------------------------------------------------------

    CREATE or replace FUNCTION deleteAttendanceDetails (startdate DATE, enddate DATE, empids varchar2) RETURN NUMBER as


    n number;

    condition varchar2 (200);

    vsql varchar2 (2000);

    BEGIN

    IF empids is not null

    THEN

    condition: condition = |' and empid in ('| empids |') ' ;

    END IF;

    vsql: =' delete from ATT_ATTENDANCESHEET where prdate between ' | StartDate | 'and' | EndDate | condition;

    EXECUTE IMMEDIATE (vsql);

    return n;

    END;

    /

    The empids parameter contains the employee IDS separated by commas.

    for example

    "1,2,3,4"

    -----------------------------------------------------------

    But when I call this function using

    Select deleteAttendanceDetails (to_date('25/01/2014','dd/mm/yyyy'), to_date (' 01/31/2014 ',' dd/mm/yyyy'), ") double;

    I get the following error

    ORA 00904: invalid identifier "JAN".

    ORA-06512: at.. .line 21

    I use oracle 10g.

    Help, please

    Do not use dynamic sql. It's more trouble that it's worth.

    Your error comes from the fact that you convert a date to a string, implicitly and then come back.

    In addition, your example doesn't have a field of prddate... so I added that, in my test table so that it works.

    Try something like that, entirely avoid dynamic sql:

    CREATE or replace FUNCTION deleteAttendanceDetails (
                                  startdate DATE,
                                  enddate DATE,
                                  empids varchar2
                               )
       RETURN NUMBER
    as
       n number;
    BEGIN
       delete from ATT_ATTENDANCESHEET
          where ( empid IS NULL
                OR empid in ( select regexp_substr ( empids, '[^,]+', 1, level) empid
                             from dual connect by level <= (LENGTH(empids) - LENGTH(REPLACE(empids, ',')) + 1)
                          )
                )
            and prdate between nvl(startdate, to_date('01-jan-1900','dd-mon-yyyy'))
                           and nvl(enddate  , to_date('01-jan-5000','dd-mon-yyyy'));
    
      return n;  -- what is "n" ?
    END;
    /
    

    Not really sure what you want to do with "n"... you have nothing in your code... so I did the same

  • HELP-immediate execution in PL/SQL has received the error ORA-00904: invalid identifier

    What is the problem with the following codes from PL/SQL (actually it comes to Oracle Metalink Note: 313175.1):
    ===========
    declare
    cursor c1 is select * from $ semantic;
    v_statement VARCHAR2 (255);
    v_nc number (10);
    v_nt number (10);
    Start
    immediate execution
    "select count (*) from $ semantics" in v_nc;
    immediate execution
    ' select count (distinct s_table_name) of semantics$ "in v_nt;
    dbms_output.put_line
    ('Edit' | v_nc |) 'columns ' | v_nt | "tables");
    to r1 c1 loop
    v_statement: = 'ALTER TABLE ' | R1.s_owner | '.' || R1.s_table_name;
    v_statement: = v_statement | «change (' |)» R1.s_column_name | ' ';
    v_statement: = v_statement | R1.s_data_type | ' (' | r1.s_char_length;)
    v_statement: = v_statement | ' CHAR))';
    immediately run v_statement;
    end loop;
    dbms_output.put_line ('Done');
    end;
    /
    =====
    Executed once the codes as sysdba against 10gr 2 database, I got this error:
    From build to select columns to change
    Editing columns 4428 35249
    declare
    *
    ERROR on line 1:
    ORA-00904: invalid identifier
    ORA-06512: at line 22

    I see nothing wrong with the line of "immediate execution". I appreciate your help!

    Thank you.

    Hello
    Try to print the offending instruction using exception, I used small test cases by changing the pl/sql block, you may need to change to respond to all other types of data in this table.

    CREATE TABLE semantics$
    AS
       SELECT USER AS owner,
              table_name,
              data_type AS s_data_type,
              column_name,
              data_length AS s_char_length
       FROM cols
       WHERE table_name = 'MY_OBJECTS';
    
    DECLARE
       CURSOR c1
       IS
          SELECT *
          FROM semantics$;
    
       v_statement   VARCHAR2 (255);
       v_nc          NUMBER (10);
       v_nt          NUMBER (10);
    BEGIN
       EXECUTE IMMEDIATE 'select count(*) from semantics$' INTO v_nc;
    
       EXECUTE IMMEDIATE 'select count(distinct table_name) from semantics$'
          INTO v_nt;
    
       DBMS_OUTPUT.put_line(   'ALTERing '
                            || v_nc
                            || ' columns in '
                            || v_nt
                            || ' tables');
    
       FOR r1 IN c1
       LOOP
          v_statement   := 'ALTER TABLE ' || r1.owner || '.' || r1.table_name;
          v_statement   := v_statement || ' modify (' || r1.column_name || ' ';
          v_statement   :=
             v_statement || r1.s_data_type || '(' || r1.s_char_length;
    
          IF (r1.s_data_type = 'NUMBER')
          THEN
             v_statement   := v_statement || '))';
          ELSE
             v_statement   := v_statement || ' CHAR))';
          END IF;
    
          DBMS_OUTPUT.put_line (v_statement);
    
          -- EXECUTE IMMEDIATE v_statement;
       END LOOP;
    
       DBMS_OUTPUT.put_line ('Done');
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Statement = ' || v_statement);
          DBMS_OUTPUT.put_line (SUBSTR (SQLERRM, 1, 200));
          RAISE;
    END;
    

    _ Output

    ALTERing 13 columns in 1 tables
    ALTER TABLE MY_OBJECTS modify (OWNER VARCHAR2(30 CHAR))
    ALTER TABLE MY_OBJECTS modify (OBJECT_NAME VARCHAR2(30 CHAR))
    ALTER TABLE MY_OBJECTS modify (SUBOBJECT_NAME VARCHAR2(30 CHAR))
    ALTER TABLE MY_OBJECTS modify (OBJECT_ID NUMBER(22))
    ALTER TABLE MY_OBJECTS modify (DATA_OBJECT_ID NUMBER(22))
    ALTER TABLE MY_OBJECTS modify (OBJECT_TYPE VARCHAR2(19 CHAR))
    ALTER TABLE MY_OBJECTS modify (CREATED DATE(7 CHAR))
    ALTER TABLE MY_OBJECTS modify (LAST_DDL_TIME DATE(7 CHAR))
    ALTER TABLE MY_OBJECTS modify (TIMESTAMP VARCHAR2(19 CHAR))
    ALTER TABLE MY_OBJECTS modify (STATUS VARCHAR2(7 CHAR))
    ALTER TABLE MY_OBJECTS modify (TEMPORARY VARCHAR2(1 CHAR))
    ALTER TABLE MY_OBJECTS modify (GENERATED VARCHAR2(1 CHAR))
    ALTER TABLE MY_OBJECTS modify (SECONDARY VARCHAR2(1 CHAR))
    Done
    

    Concerning

    Published by: OrionNet on January 5, 2009 23:53

    Published by: OrionNet on January 5, 2009 23:55

  • [Error code: 904, SQL State: 42000] ORA-00904: "G". "' NAME ': invalid

    When I run the SQL below, I get the following:

    08:00:08 [SELECT - 0 row (s), dry 0.000] [error Code: 904, SQL State: 42000] ORA-00904: "G". "" NAME ": invalid identifier

    When I comment the lines "BOLD", it works fine. I tried to fully qualify the column without success. I'm sure it's a matter of formatting.

    ************************************************

    Select
    SR. SCHOOLID,
    SR. StudentID, sr.coursenumber,
    SR. REGISTREQ_ID,
    (select
    min (rr.ID |) » -'|| URI COURSEGROUP)
    Of
    REGISTREQ rr
    where
    RR.grade_level = (select s.sched_nextyeargrade from student s where s.id = sr.studentid)
    and rr.yearid = 2100
    and rr.id not in (6426,6415)
    and rr. COURSEGROUP in
    (select
    g.Name
    Of
    g GEN
    where
    g.CAT = "coursegroups".
    and instr (g.valuet, sr.coursenumber) > 0
    and g.schoolid = sr.schoolid)
    and ((g.name as 'ALT %' and sr. GLOBALALTERNATECOURSE = 1)
    or (g.name not as 'ALT %' and sr. GLOBALALTERNATECOURSE = 0))
    ) as New_RegID
    Of
    SCHEDULEREQUESTS sr
    where
    SR. SCHOOLID = 703
    and sr.yearid = 2100

    This is because the lines that you have Ringing are out of reach for the alias 'g', which is part of the inner query.

    Maybe you want to just 'name' without the prefix "g.".

  • How to catch PL/SQL: ORA-00904 error?

    Hello
    I am trying to execute the following PL/SQL block and set up error-904 (by invalid column name) code in the exception section block.

    The name of column in the select query does not exist in the emp table and according to my understanding, since I was a manager of exceptiion for this error, he must be treated bulk exception.

    DECLARE
    invalid_column exception;
    pragma exception_init (invalid_column,-00904);
    No number;
    BEGIN
    Select empn in PEM No.
    where ename = 'King '.
    EXCEPTION
    When invalid_column then
    dbms_output.put_line (ane column does not exist)
    );
    end;
    /

    (1) can you please let me know why this isn't getting caught in the exception handler
    * I have 2) what changes should I make Exception Manager section to this invalid column name is handled in the program *.
    Thanks and greetings
    Naomie
    SQL> set serverout on
    SQL> DECLARE
      2  invalid_column exception;
      3  pragma exception_init (invalid_column,-00904);
      4  eno number;
      5  BEGIN
      6  EXECUTE IMMEDIATE 'select empn from emp where ename=''king''' INTO eno;
      7  EXCEPTION
      8  when invalid_column then
      9  dbms_output.put_line('Column ane does not exist');
     10  end;
     11  /
    Column ane does not exist
    
    PL/SQL procedure successfully completed.
    

    Please read about compiler and run time in PL/SQL engine.

    An exception handler treats a thrown exception (* run-time error or warning condition)

    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e10472/exception_handler.htm#LNPLS01316
    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e10472/errors.htm#LNPLS00701

  • 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

  • PL/SQL: ORA-00904: "CONTAINS": invalid identifier

    create or replace
    PF_SEARCH PACKAGE BODY
    IS

    PROCEDURE PF_QUICK_SEARCH
    (
    Help keyword VARCHAR2 DEFAULT NULL,
    locale VARCHAR2 DEFAULT NULL,
    VARCHAR2 DEFAULT NULL, catalogue
    VARCHAR2 NULL by DEFAULT, price list
    minCount INTEGER by DEFAULT 5,
    maxCount INTEGER by DEFAULT 1000,
    searchCount OUT INTEGER,
    categorySet OUT cursorType,
    productSet OUT cursorType
    )

    AS

    BEGIN

    SELECT count (*)
    IN searchCount
    OF dcs_pf_product_trans t1,.
    dcs_prd_prdinfo t2,
    dcs_price t3
    WHERE t1.product_id = t3.product_id
    AND t3.price_list = price list
    AND t2.product_id = t1.product_id
    AND (((CONTAINS(t1.product_id,searchWord,0) > 0
    OR CONTAINS (t1.manufacturer_part_number, searchWord, 1) > 0
    OR CONTAINS(t1.vendor_name,searchWord,2) > 0
    OR CONTAINS(t1.display_name,searchWord,3) > 0
    OR CONTAINS(t1.long_description,searchWord,4) > 0)
    AND t2.catalog_id = catalog)
    AND (t1.locale_id = local));




    IF searchCount < = minCount THEN
    OPEN for ProductSet
    SELECT t1.product_id
    OF dcs_pf_product_trans t1,.
    dcs_prd_prdinfo t2,
    dcs_price t3
    WHERE t1.product_id = t3.product_id
    AND t3.price_list = price list
    AND t2.product_id = t1.product_id
    AND (((CONTAINS(t1.product_id,searchWord,0) > 0
    OR CONTAINS (t1.manufacturer_part_number, searchWord, 1) > 0
    OR CONTAINS(t1.vendor_name,searchWord,2) > 0
    OR CONTAINS(t1.display_name,searchWord,3) > 0
    OR CONTAINS(t1.long_description,searchWord,4) > 0)
    AND t2.catalog_id = catalog)
    AND (t1.locale_id = local));

    ON THE OTHER
    IF searchCount > maxCount THEN
    OPEN for CategorySet
    SELECT DISTINCT t3.cat_lvl1_id, t3.cat_lvl2_id, t3.cat_lvl3_id
    OF dcs_pf_product_trans t1,.
    dcs_prd_prdinfo t2,
    dcs_pf_search_cat t3,
    dcs_price t4
    WHERE t1.product_id = t4.product_id
    AND t4.price_list = price list
    AND t2.product_id = t1.product_id
    AND (((CONTAINS(t1.product_id,searchWord,0) > 0
    OR CONTAINS (t1.manufacturer_part_number, searchWord, 1) > 0
    OR CONTAINS(t1.vendor_name,searchWord,2) > 0
    OR CONTAINS(t1.display_name,searchWord,3) > 0
    OR CONTAINS(t1.long_description,searchWord,4) > 0)
    AND t2.catalog_id = catalog)
    AND (t1.locale_id = local))
    AND t2.product_info_id = t3.product_info_id
    ORDER BY t3.cat_lvl1_id, t3.cat_lvl2_id, t3.cat_lvl3_id;

    ON THE OTHER

    OPEN for CategorySet
    SELECT DISTINCT t3.cat_lvl1_id, t3.cat_lvl2_id, t3.cat_lvl3_id
    OF dcs_pf_product_trans t1,.
    dcs_prd_prdinfo t2,
    dcs_pf_search_cat t3,
    dcs_price t4
    WHERE t1.product_id = t4.product_id
    AND t4.price_list = price list
    AND t2.product_id = t1.product_id
    AND (((CONTAINS(t1.product_id,searchWord,0) > 0
    OR CONTAINS (t1.manufacturer_part_number, searchWord, 1) > 0
    OR CONTAINS(t1.vendor_name,searchWord,2) > 0
    OR CONTAINS(t1.display_name,searchWord,3) > 0
    OR CONTAINS(t1.long_description,searchWord,4) > 0)
    AND t2.catalog_id = catalog)
    AND (t1.locale_id = local))
    AND t2.product_info_id = t3.product_info_id
    ORDER BY t3.cat_lvl1_id, t3.cat_lvl2_id, t3.cat_lvl3_id;


    OPEN for ProductSet
    SELECT t1.product_id
    OF dcs_pf_product_trans t1,.
    dcs_prd_prdinfo t2,
    dcs_price t3
    WHERE t1.product_id = t3.product_id
    AND t3.price_list = price list
    AND t2.product_id = t1.product_id
    AND (((CONTAINS(t1.product_id,searchWord,0) > 0
    OR CONTAINS (t1.manufacturer_part_number, searchWord, 1) > 0
    OR CONTAINS(t1.vendor_name,searchWord,2) > 0
    OR CONTAINS(t1.display_name,searchWord,3) > 0
    OR CONTAINS(t1.long_description,searchWord,4) > 0)
    AND t2.catalog_id = catalog)
    AND (t1.locale_id = local));

    END IF;
    END IF;

    END PF_QUICK_SEARCH;

    PROCEDURE PF_CATEGORY_SEARCH
    (
    Help keyword VARCHAR2 DEFAULT NULL,
    locale VARCHAR2 DEFAULT NULL,
    VARCHAR2 DEFAULT NULL, catalogue
    VARCHAR2 NULL by DEFAULT, price list
    parentCat VARCHAR2 DEFAULT NULL,
    productSet OUT cursorType
    )

    AS

    BEGIN

    OPEN for ProductSet
    SELECT t4.product_id
    OF dcs_pf_product_trans t1,.
    dcs_prd_prdinfo t2,
    dcs_price t3,
    dcs_product t4
    WHERE t1.product_id = t3.product_id
    AND t3.price_list = price list
    AND t2.product_id = t1.product_id
    AND (((CONTAINS(t1.product_id,searchWord,0) > 0
    OR CONTAINS (t1.manufacturer_part_number, searchWord, 1) > 0
    OR CONTAINS(t1.vendor_name,searchWord,2) > 0
    OR CONTAINS(t1.display_name,searchWord,3) > 0
    OR CONTAINS(t1.long_description,searchWord,4) > 0)
    AND t2.catalog_id = catalog)
    AND (t1.locale_id = local))
    AND t1.product_id = t4.product_id
    AND t4.parent_cat_id = parentCat;


    END PF_CATEGORY_SEARCH;

    PROCEDURE PF_GENERIC_FULL_SEARCH
    (
    SQLQuery VARCHAR2 DEFAULT NULL,
    sqlCountQuery VARCHAR2 DEFAULT NULL,
    categoryQuery VARCHAR2 DEFAULT NULL,
    minCount INTEGER by DEFAULT 5,
    maxCount INTEGER by DEFAULT 1000,
    count ON the WHOLE,
    countSet OUT cursorType,
    categorySet OUT cursorType,
    productSet OUT cursorType
    )
    AS

    searchCount INTEGER.

    BEGIN

    CountSet OPEN for sqlCountQuery;
    SEEK countSet INTO searchCount;
    County: = searchCount;

    IF searchCount < = minCount THEN
    ProductSet OPEN for sqlquery;
    ON THE OTHER
    IF searchCount > maxCount THEN
    CategorySet OPEN for categoryQuery;
    ON THE OTHER
    CategorySet OPEN for categoryQuery;
    ProductSet OPEN for sqlquery;
    END IF;
    END IF;

    END PF_GENERIC_FULL_SEARCH;

    PROCEDURE PF_GENERIC_PROD_SEARCH
    (
    SQLQuery VARCHAR2 DEFAULT NULL,
    productSet OUT cursorType
    )

    AS
    BEGIN
    ProductSet OPEN for sqlquery;

    END PF_GENERIC_PROD_SEARCH;

    END PF_SEARCH;
    ----------------------------------------

    Package body PFCA4. PF_SEARCH@US_DEV_WD1_PFCA4
    Error (22.2): PL/SQL: statement ignored
    Error (34.5): PL/SQL: ORA-00904: "CONTAINS": invalid identifier
    Error (43.5): PL/SQL: statement ignored
    Error (54.5): PL/SQL: ORA-00904: "CONTAINS": invalid identifier
    Error (61.7): PL/SQL: statement ignored
    Error (73,14): PL/SQL: ORA-00904: "CONTAINS": invalid identifier
    Error (82.7): PL/SQL: statement ignored
    Error (94,14): PL/SQL: ORA-00904: "CONTAINS": invalid identifier
    Error (102.6): PL/SQL: statement ignored
    Error (113.5): PL/SQL: ORA-00904: "CONTAINS": invalid identifier
    Error (137,5): PL/SQL: statement ignored
    Error (149,5): PL/SQL: ORA-00904: "CONTAINS": invalid identifier
    ---------------

    Think you that trying to do something like that?

    CONTAINS(t1.manufacturer_part_number,searchWord,1) > 0
    

    How would you do the same thing with INSTR or SIMILAR?

    select * from dual where instr('Test','st') > 0;
    select * from dual where 'ABCXD' like '%' || dummy || '%';
    
  • RMAN - 06004:ORACLE error in the recovery catalog. ORA-00904: invalid...

    Hello all,.

    One of our backups RMAN fails with the following error message. Any suggestions would be greatly appreciated.

    ==================================================================================================

    From backup 2008-12-30 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03002: failure of the backup command to 2008-12-30 22:03:47
    RMAN-06004: the recovery catalog database ORACLE error: ORA-00904: invalid identifier

    RMAN >
    RMAN > #BACKUP # ARCHIVELOG delete all '% d_bkp_al_ % t_Set % s_Piece %p' entry FORMAT;
    2 >
    3 > # DELETE ARCHIVELOG until ' SYSDATE-7 ";
    4 >
    5 > # check if the database can be restored
    6 > RESTORE DATABASE # VALIDATE;
    7 >
    8 > # check if controlfile can be restored
    9 > #RESTORE # CONTROLFILE to ' / backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10 >
    11 > # check if archivelogs for these past two weeks can be restored
    12 > # RESTORE ARCHIVELOG FROM TIME ' SYSDATE-7' VALIDATE ';
    13 >
    14 > #-check all backups on backup media are intact
    15 > # CROSSCHECK BACKUP OF DATABASE;
    16 >
    17 > #-display based on a list of files that need to be stored on the retention
    18 > policy #. For this case study, the files that do not have at least 1 backups
    19 > # will be reported.
    20 > REPORT NEED backup.
    RMAN retention policy apply to the order
    RMAN retention policy is set to 7 days recovery window
    Report of the files whose recovery needs more 7 days of archived newspapers
    Days of files name
    ---- ----- -----------------------------------------------------
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03002: failure of command report at 2008-12-30 22:03:48
    RMAN-06004: the recovery catalog database ORACLE error: ORA-00904: invalid identifier

    RMAN >
    RMAN > #-remove unnecessary backups. This command deletes the backups based on the
    2 > retention policy of #.
    3 > # commented DELETE OBSOLETE - TSM not configured to remove on 68
    4 > #DELETE # OBSOLETE;
    5 >
    6 > #-complete list of the existing backups
    7 > LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03002: failure of the list command at 2008-12-30 22:03:49
    RMAN-06004: the recovery catalog database ORACLE error: ORA-00904: invalid identifier

    RMAN >
    RMAN > # end of file.
    2 > * end-of-file *.

    RMAN >

    Published by: ORA_UMAIR on December 31, 2008 07:51

    No help is possible.
    You publish a file of newspaper only, and can not see the command that failed.
    Also you include, contrary to the recommendation in the post on Forums label, the complete version number of 4-digit.
    This is important because they either has an error in your script that does not find RMAN or you hit a bug.

    -----
    Sybrand Bakker
    Senior Oracle DBA

  • 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.

  • ORA-00904: invalid identifier

    Hi all

    I'm getting ORA-00904: "SNO_T": invalid identifier will be done in this example. Please let me know where I have error.

    create table t4(name varchar2(22),sno number);
    
    
    insert into t4 values('suman2',2);
    insert into t4 values('suman',1);
    
    create or replace type t4_t as object(
     name_t  varchar2(22),
     sno_t   number
     );
    
    
    create or replace type t4_m is table of t4_t;
    
    
    /
    declare
     l_toys t4_m;
     l1     pls_integer;
    begin
     select t4_t(name_t,sno_t)  
      bulk collect into l_toys
      from t4;
    -- DBMS_OUTPUT.PUT_line(l_toys.count);
    
     select count(*) into l1 from t4;
    
    
    DBMS_OUTPUT.PUT_line(l1);
    
    
    end;
    
    Error report -
    ORA-06550: line 5, column 21:
    PL/SQL: ORA-00904: "SNO_T": invalid identifier
    ORA-06550: line 5, column 2:
    PL/SQL: SQL Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    

    Select t4_t (name_t, sno_t)

    bulk collect into l_toys

    T4;

    the columns in your table are called name and sno, so you must use these names in your select statement

    t4_t is the manufacturer that expects two values (a string and a number) and having built an object, you will be able to access the object by using object_name.sno_t, but do not all by building this...

    HTH

Maybe you are looking for

  • Flash crash constantly?

    I am running Firefox v32.0.3 and Flash v15.0.0.152Whenever I visit a site that has Flash content flash crashes. This is error information: Signature of the problem: Problem Event Name: APPCRASH Application Name: FlashPlayerPlugin_15_0_0_152.exe Appli

  • spinning ball

    iMac Mid 2010-8 GB memory / 3.2 Ghz Intel Core i3 processor / 1 SATA to and 3 TB external WD my book for Mac drive OSX installed may 2016 10.11.5 spinning ball occurs on almost all clicks to a new application... EXTREMELY slow, nothing I have experie

  • HP touchsmart 310 pc - screen goes black

    hope someone can advise what I need to do. I have a hp touchmart 310, product # qp749aa #aba with windows 7. computer emits a loud whistle, then the screen goes black.  It will not respond to the keyboard or the mouse, and I have to hold the on/off s

  • Vista will not allow me to play files with winamp or mediamonkey. Help, please!

    I downloaded mediamonkey successfully, but as soon as I clicked on a music file to play I got this message. "MediaMonkey-Audio Library has stopped working. A problem caused the blocking of the program works correctly. Windows close the program and no

  • ISE 1.1 - switch ignores 'Session-Timeout '.

    Hi all I'm playing with the service to ISE customers and have some difficulties in function of time. After comments connects, the Radius attributes are sent to the switch (3750G) one of them is Session-Timeout, which should be similar to 1 h (Default