ORA-00904: "ECM_UTIL"."CONCAT_COL"

Hi,
I am trying to create EM repo with emca -repos create but every time i got ORA-00904....
Database is 11.2.0.1 64Bit Standard edition end OS is Oracle Enterprise Linux 5.4 64bit.
I have also try RepManager ... ... ... -action create the result is same (failed).
Log file emca_2009_10......log give me this information:
Oct 27, 2009 11:45:22 AM oracle.sysman.emcp.EMReposConfig createRepository
CONFIG: ORA-00904: "ECM_UTIL"."CONCAT_COL": invalid identifier
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-00904: "ECM_UTIL"."CONCAT_COL": invalid identifier
Log file emca_repos_create...
View created.
ecm_util.concat_col( 'home',
ERROR at line 4:
ORA-00904: "ECM_UTIL"."CONCAT_COL": invalid identifier
Is there any script to create ECM_UTIL.CONCAT_COL manually?
Thanks for any help in advance.

Ok,
I've solved it with DBCA (Configure database Options) and few ignores... But i will recreate repository if someone have better solution.
Regards

Similar Messages

  • Getting ora:00904 invalid indentifier error while running i query

    Hi,
    I have a remote database and local database both are oracle 10gR2.Now i have written the below mentioned query in my local database and is working fine,but in case remote database it is throughing error ora:00904 invalid indentifier.
    I had export the dump from remote db and import it on my local db and i tried the same and it is working fine on local after that also.
    As i believe that this error usually come for column name not exist or column name or it's length or for any special character in column name of the table.But as i said it is working fine on local db but not in remote db though i am using the same dump for local and remote.
    Though when i am querying the table i can able to fetch data for the any record but when i am using the below mentioned query for the same i am getting the error.As i am doing this to fecth the data for child parent related relationship.
    Can any one suggest is there anything related to configaration or something else.
    Please do let me know if you do want some more information on the query what i am doing inside of it.
    Rgds,
    Anit
    Edited by: Anit A. on Sep 1, 2008 2:32 AM
    Edited by: Anit A. on Sep 1, 2008 2:33 AM

    WITH t
    AS
    SELECT decode(t.spnlevel
    ,3,t.u_quotesdtlid
    ,2,decode((select count(*)
    from u_quotesdtl t2
    where t2.u_quotesdtlid = t.u_quotesdtlid
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,(select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '3'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),t.u_quotesdtlid
    ,1,decode((select count(*)
    from u_quotesdtl t2
    where t2.QUOTEID = t.QUOTEID
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,t.u_quotesdtlid,decode((select count(*)
    from u_quotesdtl t3
    where t3.QUOTEID = t.QUOTEID
    and t3.parentspn = (t3.jobgroupid||':'||t3.jobtype)
    and t3.u_quotesdtlid in (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),0,(select t4.u_quotesdtlid
    from u_quotesdtl t4
    ,(select t1.parentspn
    ,t1.jobtype
    ,t1.jobgroupid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ) t5
    where t4.spnitemcode = t5.parentspn
    and t4.spnlevel = '3'
    and t4.jobtype = t5.jobtype
    and t4.jobgroupid = t5.jobgroupid
    and t4.QUOTEID = t.QUOTEID
    (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ,null,t.u_quotesdtlid) as parentquoteid
    ,t.u_quotesdtlid as quotesdtlid
    ,t.spnlevel as spnlevel
    FROM u_quotesdtl t
    WHERE t.QUOTEID ='som key id'
    ORDER BY parentquoteid,t.spnlevel desc
    select * from t;

  • PL/SQL: ORA-00904:

    Hello..
    We have custom package which is working fine since long time. But all at once we are getting compilation errors.. The following are the error messages that we are getting
    233/13 PL/SQL: SQL Statement ignored
    248/20 PL/SQL: ORA-00904: "SLIP_TYPE": invalid identifier
    254/13 PL/SQL: SQL Statement ignored
    262/20 PL/SQL: ORA-00904: "SLIP_TYPE": invalid identifier
    527/16 PL/SQL: SQL Statement ignored
    593/36 PL/SQL: ORA-00904: "SLIP_DATE": invalid identifier
    597/16 PL/SQL: SQL Statement ignored
    636/36 PL/SQL: ORA-00904: "SLIP_DATE": invalid identifier
    The same package is working fine in all the other instances .

    I don't know what else to suggest, so I'll point you to the error code:
    ORA-00904:     string: invalid identifier
    Cause:     The column name entered is either missing or invalid.
    Action:     Enter a valid column name. A valid column name must begin with a letter, be less
    than or equal to 30 characters, and consist of only alphanumeric characters and the
    special characters $, _, and #. If it contains other characters, then it must be
    enclosed in double quotation marks. It may not be a reserved word.And here you can see how an ORA-00904 happens.
    SQL> create table pos_header
      2  ( slip_date date
      3  , slip_type varchar2(1)
      4  )
      5  /
    Tabel is aangemaakt.
    SQL> create procedure test1
      2  as
      3  begin
      4    update pos_header
      5       set slip_date = sysdate
      6     where slip_type = 'A'
      7    ;
      8  end;
      9  /
    Procedure is aangemaakt.
    SQL> show err
    Er zijn geen fouten.
    SQL> exec test1
    PL/SQL-procedure is geslaagd.
    SQL> alter table pos_header drop column slip_type
      2  /
    Tabel is gewijzigd.
    SQL> exec test1
    BEGIN test1; END;
    FOUT in regel 1:
    .ORA-06550: line 1, column 7:
    PLS-00905: object RWK.TEST1 is invalid
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL> alter procedure test1 compile
      2  /
    Waarschuwing: procedure is gewijzigd met compilatiefouten.
    SQL> show err
    Fouten voor PROCEDURE TEST1:
    LINE/COL ERROR
    4/3      PL/SQL: SQL Statement ignored
    6/10     PL/SQL: ORA-00904: "SLIP_TYPE": invalid identifierHope this helps assuring you that the column is missing and I hope you'll find out the table and schema where this column is missing.
    Regards,
    Rob.

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

    I have a PL/SQL script processing information between Oracle database and MySQL database. My script ran perfectly with DG4ODBC 11.1.0.7. Then we upgraded Oracle to 10.2.0 and DG4ODBC 11.2.0.2. Now if I run my script from Solaris command line like ./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"."attempt": invalid identifier
    The strange thing is if I run the same query by cut and paste into sqlplus from command line, the query works perfectly without any problems.
    What is the cause of this problem?
    Any help would be greatly appreciated.
    Jeffrey

    Hi Klaus,
    The problem was solved after I updated MySQL ODBC to a new version from 5.1.8 to 5.1.13.
    Summary of the problem and its solution:
    The Problem: It appears 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 I updated MyODBC to 5.1.13, my PL/SQL scripts all work.
    I need to point out that with MyODBC 5.1.8, I can run queries and updates from SQL*Plus console, but now PL/SQL scripts.
    I'll close this thread.
    Once again, thank you and happy holidays.
    Jeffrey

  • Discoverer report :ORA -00904 Invalid Identifier

    Hi ,
    we are using an apps mode EUL (version4i) ,
    in the business area "Account Receivables"--->Customer Transaction Lines Folder,
    when we pull up any item from this folder to create a report, it shows a
    "ORA-00904 Invalid Identifier " error
    how to fix it , whether the Item might be Deleted in view definition of this folder,
    just a refresh of the folder is enough ?
    thanks in advance

    Hi,
    Refreshing the folder should be your first step.
    Rod West

  • Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier

    Hi everyone,
    we are facing the below issue when trying to schedule a BI report.
    Error Details:
    +oracle.apps.xdo.servlet.scheduler.ProcessingException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080319)): oracle.toplink.exceptions.DatabaseException+
    Internal Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    Error Code: 904
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT 50 WHERE SEQ_NAME = 'JOB_ID_SEQ'+
    Query: DataModifyQuery()
    +     at oracle.apps.xdo.servlet.scheduler.toplink.ToplinkDataHandler.insertJob(ToplinkDataHandler.java:830)+
    +     at oracle.apps.xdo.servlet.ui.scheduler.SchedulerServlet.scheduleJob(SchedulerServlet.java:1896)+
    +     at oracle.apps.xdo.servlet.ui.scheduler.SchedulerServlet.doPost(SchedulerServlet.java:293)+
    +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)+
    +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)+
    +     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)+
    +     at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:94)+
    +     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)+
    +     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)+
    +     at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)+
    +     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)+
    +     at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)+
    +     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)+
    +     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)+
    +     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)+
    +     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)+
    +     at java.lang.Thread.run(Thread.java:595)+
    +Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080319)): oracle.toplink.exceptions.DatabaseException+
    Internal Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    Error Code: 904
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT 50 WHERE SEQ_NAME = 'JOB_ID_SEQ'+
    Query: DataModifyQuery()
    +     at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:296)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:724)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:790)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:524)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeCall(AbstractSession.java:795)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:222)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:202)+
    +     at oracle.toplink.queryframework.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:55)+
    +     at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:671)+
    +     at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1074)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1032)+
    +     at oracle.toplink.sequencing.QuerySequence.update(QuerySequence.java:319)+
    +     at oracle.toplink.sequencing.QuerySequence.updateAndSelectSequence(QuerySequence.java:258)+
    +     at oracle.toplink.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:62)+
    +     at oracle.toplink.sequencing.DefaultSequence.getGeneratedVector(DefaultSequence.java:144)+
    +     at oracle.toplink.sequencing.Sequence.getGeneratedVector(Sequence.java:256)+
    +     at oracle.toplink.internal.sequencing.SequencingManager$Preallocation_Transaction_NoAccessor_State.getNextValue(SequencingManager.java:444)+
    +     at oracle.toplink.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:873)+
    +     at oracle.toplink.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:75)+
    +     at oracle.toplink.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:234)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.assignSequenceNumbers(UnitOfWorkImpl.java:419)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:497)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1407)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1167)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:939)+
    +     at oracle.apps.xdo.servlet.scheduler.toplink.ToplinkDataHandler.insertJob(ToplinkDataHandler.java:815)+
    +     ... 16 more+
    Caused by: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    +     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)+
    +     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)+
    +     at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:113)+
    +     at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:561)+
    +     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)+
    +     at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1585)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:713)+
    +     ... 45 more+
    Found a thread related to this but there it was explained that the error was occuring when trying to notify regarding output through email. In our case, issue is occuring just during scheduling itslef.
    Also I haved checked the following schedular tables in my database.
    SQL> select table_name from all_tables where table_name like 'S_NQ%'
    +2 /+
    TABLE_NAME
    S_NQ_ERR_MSG
    S_NQ_INSTANCE
    S_NQ_JOB_PARAM
    S_NQ_JOB
    SQL> select SEQ_NAME.CURRVAL FROM DUAL;
    select SEQ_NAME.CURRVAL FROM DUAL
    *+
    ERROR at line 1:
    ORA-02289: sequence does not exist
    Please help me out in solving this as I have tried almost all possible solutions.
    Thanks,
    Sri Harsha.
    Edited by: user10545574 on Dec 20, 2009 10:24 PM

    Hello,
    In the delivery email configuration server page (under BI Publisher Admin Tab), the username / password to enter is the one defined on the email server itself. It is the user that will be user to send the emails when scedhuling a report.
    It may not be Administrator/ Administrator (not a user defined with OBI admin tool) but the username/password defined on the email server itself.
    Moreover, to properly configure the BI Publisher Scheduler, it is a prerequistes to create bipsched user on Oracle DB and install the schema tables in Oracle DB (by clicking on Install Schema button after defining database connection under Admin / Scheduler Configuration tab)
    From the error your are getting 'SEQ_NAME unknown..., it appears that the tables are not created'.
    Hope this helps and good luck
    Matthieu

  • Ora-00904 when creating a view

    Hello everyone,
    I'm trying to create a view based on 6 tables, and I'm getting an ORA-00904: Invalid column name error. I also tried to do a basic select * from table_name and inserted one of the restrictions in my where clause and am getting the same error. I've checked and re-checked the column names in my script.
    Can anything else be causing this error?
    Rose

    CREATE OR REPLACE VIEW GEN_VISTA_VW (PERSON_ID,
    LAST_NAME, MIDDLE_NAME, FIRST_NAME, ADDRESS, LINE2, LINE3, COMMUNITY, POSTAL_CODE, HOME_PHONE, BUS_PHONE, PROVINCE, HOME_SCHOOL_ID, EMPNO, POSITION, REG_NUMB)
    AS (SELECT
              PERSON.PERSON_ID,
              PERSON.LAST_NAME,
              PERSON.MIDDLE_NAME,
              PERSON.FIRST_NAME,
              PERADDR.LINE1,
              PERADDR.LINE2,
              PERADDR.LINE3,
              PERADDR.CITY,
              PERADDR.ZIP,
              PERPHONE.PHONE_NO,
              TBLLOC.PHONE_NO,
              PERADDR.STATE,
              TBLLOC.LOCATION_CODE,
              EMPCOMP.EMPNO,
              TBLPOS.POSITION_TITLE,
              EMPQUAL.REG_NUMB
         FROM
              PERSON,
              PERADDR,
              PERPHONE,
              TBLLOC,
              TBLPOS,
              EMPCOMP,
              EMPQUAL
         WHERE
              person.person_id = tblpos.person_id
    AND person.person_id = perphone.person_id
         AND person.person_id = peraddr.person_id
         AND person.person_id = empqual.person_id
         AND person.person_id = empcomp.person_id
         AND tblpos.location_code = tblloc.location_code)
    Thank you

  • ORA-00904: invalid column name in select query by using abstract datatype

    Hi,
    I had created abstract datatype as PERSON_TY and ADDRESS_TY ,
    after inserting the record . i'm tryng to select the column but i got the error , even i refferd all those thing. they are given that same please look this finde me a result.
    SQL> DESC PERSON_TY
    Name Null? Type
    NAME VARCHAR2(25)
    ADDRESS ADDRESS_TY
    SQL> DESC ADDRESS_TY
    Name Null? Type
    STREET VARCHAR2(30)
    CITY VARCHAR2(25)
    STATE CHAR(2)
    COUNTRY VARCHAR2(15)
    SQL> SELECT * FROM EMPLOYE
    2 ;
    EMP_CODE
    PERSON(NAME, ADDRESS(STREET, CITY, STATE, COUNTRY))
    10
    PERSON_TY('VENKAT', ADDRESS_TY('112: BLUE MOUNT', 'CHENNAI', 'TN', 'INDIA'))
    20
    PERSON_TY('SRINI', ADDRESS_TY('144: GREEN GARDEN', 'THAMBARAM', 'TN', 'INDIA'))
    SQL> SELECT PERSON.NAME FROM EMPLOYE
    2 ;
    SELECT PERSON.NAME FROM EMPLOYE
    ERROR at line 1:
    ORA-00904: invalid column name
    regards
    venki

    SELECT PERSON.NAME FROM EMPLOYEIf you look in the documentation, you will see that we need to alias the table in order to make this work:
    select e.person.name from employees e
    /Cheers, APC
    Blog : http://radiofreetooting.blogspot.com

  • Getting ORA-00904 whle running a procedure!

    hi ,
    the following procedure is meant for getting the details which has name of the user tables alone along with number of columns,but am getting -ERROR IN BLOCK:::ORA-00904: "tablename": invalid identifier.
    DECLARE
    v_cols NUMBER:=0;
    cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
    FOR rec IN c
    LOOP
    v_cols:=0;
    EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in ('||rec.table_name||') group by TABLE_NAME' INTO v_num_rows;
    DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
    END LOOP;
    DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;
    if there anything needs to change in procedure ,let me know.

    DECLARE
           v_cols NUMBER:=0;
           cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
           FOR rec IN c
          LOOP
              v_cols:=0;
          EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in ('''||rec.table_name||''') group by TABLE_NAME' INTO v_num_rows;      ------> Added '' before and After Table Name to allow Oracle to consider as String
              DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
          END LOOP;
          DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;You can use below version using Parameter Binding (Untested!!!)
    DECLARE
           v_cols NUMBER:=0;
           cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
           FOR rec IN c
          LOOP
              v_cols:=0;
          EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in (:1) group by TABLE_NAME' INTO v_num_rows using rec.table_name;
              DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
          END LOOP;
          DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;

  • Error ORA-00904  invalid identifier

    There are so many different employee rates colums in the employee table .
    e.g)
    emp_rate_1 column has all different salaries(10,20,30)
    emp_rate_2 column has all different salaries(20,30,40)
    If I do pick up one rate , it works fine as below
    select
         SUM(emp_rate_1) as emp_rate_1
                   from employee_t
    result $60
    but i have to summarize all different rate amount using loop. before looping method,
    I tried as simple like below
    declare
    V_emp_rate_1_ID number;
    begin
    V_emp_rate_1_ID :=1;
    select
         SUM(emp_rate_||trim(V_emp_rate_1_ID)) as emp_rate_1
                   from employee_t ;
    end;
    I have an error message;
    PL/SQL: ORA-00904: "emp_rate_": invalid identifier
    ORA-06550: line 5, column 1:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    how can I put dynamic column into Sum() in the query?
    or would you give me your advice to solve the solution.

    Not clear whether you are trying to get two sums (one for each column) or one sum that totals both columns)
    select
    SUM(emp_rate_1) as emp_rate_1
    from employee_t
    result $60But you can do all three with one query
    select
    SUM(emp_rate_1) as emp_rate_1, sum(emp_rate_2) as emp_rate_2, sum (emp_rate_1 + emp_rate_2) as sum_both
    from employee_t

  • ORA-00904 Error while running CMP EJB

    When I am running my CMP bean, I get following error,
    2006-07-02 09:58:17,171 DEBUG org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountBean#fi ndByAccountNumber] Executing SQL: SELECT t0_a.ACCOUNT.UOID FROM ACCOUNT t0_a WHERE (t0_a.ACCOUNT.ACCOUNT_NUMBER = ?)
    2006-07-02 09:58:17,250 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountBean#fi ndByAccountNumber] Find failed java.sql.SQLException:
    ORA- 00904: "T0_A"."ACCOUNT"."ACCOUNT_NUMBER": invalid identifier.
    Why is it giving invalide identifier? the length of this identifer is also less then 30 and there are no special characters being used in it.

    I think I have read that you cannot use the "." to navigate through the object, you can only use it for accessing a field of an object (i.e. a column of a table in the DB).
    So, never use more than 1 "." in your requests. In your case, I guess that you need to reformulate the request.

  • Dynamic SQL Issue ORA-00904:invalid identifier error

    Here is my SP
    create or replace procedure srini_ref_cursor_test(p_county_code IN VARCHAR2,
    p_ref_cur out PK_FR_TYPES.cursor_type) is
    query_str varchar2(5000);
    begin
    query_str := 'SELECT * FROM dw_county where county_name = :P ';
    open p_ref_cur for query_str USING p_county_code;
    insert into srini_query_str_test values (query_str);
    commit;
    end srini_ref_cursor_test;
    When I pass the p_county_code = Adams working find.
    create or replace procedure srini_ref_cursor_test(p_county_code IN VARCHAR2,
    p_ref_cur out PK_FR_TYPES.cursor_type) is
    query_str varchar2(5000);
    begin
    query_str := 'SELECT * FROM dw_county where county_name in ('||p_county_code||')';
    open p_ref_cur for query_str;
    insert into srini_query_str_test values (query_str);
    commit;
    end srini_ref_cursor_test;
    When I pass the p_county_code = Adams for above SP I got the following error
    ORA-00904: "ADAMS": invalid identifier error
    With out Bind variables how Can I pass the Char type values in Dynamic SQL ?
    I would like to pass multipule values to p_county_code like 'Adams','Ashley' etc
    How Can I do this ?
    Thank for great help.
    Srini

    How do I write the Dynamic SQL for
    SELECT * FROM DW_COUNTY WHERE COUNTY_NAME LIKE 'Ad%'
    The usual way...
    hr@ORA10G>
    hr@ORA10G> var str varchar2(1000);
    hr@ORA10G> var cr refcursor;
    hr@ORA10G>
    hr@ORA10G> exec :str := 'select * from employees where first_name like ''A%''';
    PL/SQL procedure successfully completed.
    hr@ORA10G> -- note the escape character for each single quote
    hr@ORA10G> print str
    STR
    select * from employees where first_name like 'A%'
    hr@ORA10G>
    hr@ORA10G> exec open :cr for :str;
    PL/SQL procedure successfully completed.
    hr@ORA10G> print cr
    EMPLOYEE_ID FIRST_NAME           LAST_NAME                 EMAIL                     PHONE_NUMBER      HIRE_DATE JOB_ID    SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
            103 Alexander            Hunold                    AHUNOLD                   590.423.4567         03-JAN-90 IT_PROG          9000                       102            60
            115 Alexander            Khoo                      AKHOO                     515.127.4562         18-MAY-95 PU_CLERK         3100                       114            30
            121 Adam                 Fripp                     AFRIPP                    650.123.2234         10-APR-97 ST_MAN           8200                       100            50
            147 Alberto              Errazuriz                 AERRAZUR                  011.44.1344.429278   10-MAR-97 SA_MAN          12000             .3        100            80
            158 Allan                McEwen                    AMCEWEN                   011.44.1345.829268   01-AUG-96 SA_REP           9000            .35        146            80
            167 Amit                 Banda                     ABANDA                    011.44.1346.729268   21-APR-00 SA_REP           6200             .1        147            80
            175 Alyssa               Hutton                    AHUTTON                   011.44.1644.429266   19-MAR-97 SA_REP           8800            .25        149            80
            185 Alexis               Bull                      ABULL                     650.509.2876         20-FEB-97 SH_CLERK         4100                       121            50
            187 Anthony              Cabrio                    ACABRIO                   650.509.4876         07-FEB-99 SH_CLERK         3000                       121            50
            196 Alana                Walsh                     AWALSH                    650.507.9811         24-APR-98 SH_CLERK         3100                       124            50
    10 rows selected.
    hr@ORA10G>
    hr@ORA10G>pratz

  • Multi-row sub query returns  ORA-00904 :invalid identifier error

    I am creating a report from two tables that I am not joining. I want a single line for every row in table1 that meets a date range. Table2 can contain none or many rows for each recored in table1. I want to get up to two fields from table2.
    I was using a case statement to check if there was data and then an in-line query or subquery. Once again, the idea is to have a single line on the report for each table1 record.
    I get this error with the code below. It seems the nested multi-row subquery can not see the a.cr_mas_cr_no identifier.
    ORA-00904: "a"."cr_mas_cr_no": invalid identifier
    Any help is greatly appreciated,
    Sam
    select
    a.cr_mas_cr_no "CRNO", a.cr_mas_type "TYPE", a.cr_mas_status "CR Status",
    a.cr_mas_date_logged "Logged date", a.CR_REL_REQ_APP_DATE "RTP approved",a.CR_REL_REQ_RTP_DATE "RTP Date",
    a.cr_accepted_date "Complete", a.cr_mas_submitted_by "Requester",
    select doc_user FROM crrm_cr_documents WHERE doc_cr_number =a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'BD' ) "Bus Design",
    (select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TD' ) "Tech Design",
    (select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TE' ) "User acceptance test",
    case
    when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 0
    then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    end
    "RTP #1",
    case
    when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 1
    then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 2)
    end
    "RTP #2",
    a.CR_REL_REQ_RTP_BY "Released by",
    a.CR_ACCEPTED_BY "Post RTP User Acceptance",
    a.cr_mas_title "Title", a.cr_mas_id "ID"
    from
    crrm_crmaster a
    where
    (a.CR_REL_REQ_RTP_DATE >= :P1109_BEGDATE and (a.CR_REL_REQ_RTP_DATE <= :P1109_ENDDATE) and
    (a.cr_mas_status = 'Complete' or (a.cr_mas_status = 'Release Approved'and a.CR_REL_REQ_APP_DATE < :P1109_ENDDATE))
    Message was edited by:
    slavanaway

    Iceman,
    Thanks for the reply I will try your suggestion.
    I will try and explain why I think two subqueries (an in-line query with a subquery?) are required. I will use the creation of the column RTP #1 as the example as the RTP #2 column is only different in the rownum selected.
    Looking only at the lines that fail, here is my analysis. (If I rem out the two case lines the query runs, I just don't get two columns of data I need.) I will only examine the first case as the second is changed to extract the second approval via the rownum = 2 criteria. The first statement checks there is at least one RTP approval stored for the request and then gets the user who approved the request if the test is true.
    case when
    (select count(appr_user) from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') > 0
    then
    The above part works fine and the correct count of approvals is returned.
    (select appr_user from (select * from crrm_cr_approvals where appr_cr_no=a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    end
    "RTP #1",
    I moved the parenthesis to the correct location. There can be multiple approvals for a given parent record. Some parent records need one, some need two approvals. If I replace
    (select appr_user from (select * from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    with
    (select appr_user from approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP' and rownum = 1)
    The correct result is returned because it returns exactly one row as rownum=1 limits the query. When rownum = 2 then the query returns null as the rownum never gets to two as the rownum column is built via the set created by the second subquery.
    The subquery builds a set of approvals for a specific "cr_no" and appr_type of "RTP". the outer query then looks at the rownum of the second query
    Here is where I got the rownum information from;
    http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    So here is what I think is happening;
    1. Main query From and Where are processed. This should provide the "set" for the query
    2.The from subqueries for RTP #1 and RTP #2 should be able to access the a.cr_mas_cr_no field and build a set from the approvals table.
    3.The RTP #1/2 subquery (inline maybe a better description?) would then get the correct row from the from subquery.
    The error "invalid identifier" refers to the a.cr_mas_cr_no field. I assume it means it can not resolve the table alias inside the subquery.
    So maybe your grouping would help, I will try.
    Sam

  • ORA-00904 invalid identifier error

    Here are the steps to reproduce this. My DB version is 9i R2.
    1) create table xmlsun1 of xmltype;
    2) create table xmlsun2 as select * from xmlsun1;
    Two Tables of XML Type created successfully
    3) insert into xmlsun1 values(xmltype('<employees><employee id="35"><FirstName>Tom</FirstName><LastName>Kyte</LastName></employee></employees>'));
    4) insert into xmlsun2 values(xmltype('<employees><employee id="35"><FirstName>Tom</FirstName><LastName>Kyte</LastName></employee></employees>'));
    Now when i query, i can see one record in each tables.
    The problem is only when updation.
    5) update xmlsun1 x
    set value(x) = updatexml(value(x),'/employees/employee/@id','37')
    where existsnode(value(x),'/employees/employee[FirstName = "Tom"]') = 1;
    1 row updated
    6) update xmlsun2 x
    set value(x) = updatexml(value(x),'/employees/employee/@id','37')
    where existsnode(value(x),'/employees/employee[FirstName = "Tom"]') = 1;
    This updation fails with the error : ORA-01775: looping chain of synonyms
    I tried to change alias of xmlsun2 to y
    update xmlsun2 y
    set value(y) = updatexml(value(y),'/employees/employee/@id','37')
    where existsnode(value(y),'/employees/employee[FirstName = "Tom"]') = 1;
    I get an error saying that Y is an invalid identifier. Now, how can i update the table xmlsun2? I can't use the alias x nor any other alias.
    Thanks,
    Sundar

    I've filed bug 5560960 for this behavoir, which is still not what you are describing.. Do you have SYNONYMS defined somewhere in your example ?
    $ sqlplus scott/tiger @testcase3
    SQL*Plus: Release 9.2.0.6.0 - Production on Fri Sep 22 11:59:46 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    SQL> drop table xmlsun1
    2 /
    Table dropped.
    SQL> create table xmlsun1 of xmltype
    2 /
    Table created.
    SQL> drop table xmlsun2
    2 /
    Table dropped.
    SQL> create table xmlsun2 as select * from xmlsun1
    2 /
    Table created.
    SQL> insert into xmlsun1 values( xmltype ('<employees><employee id="35"><FirstName>Tom</FirstName><LastName>Kyte</LastName></employee></employees>') )
    2 /
    1 row created.
    SQL> insert into xmlsun2 values( xmltype ('<employees><employee id="35"><FirstName>Tom</FirstName><LastName>Kyte</LastName></employee></employees>') )
    2 /
    1 row created.
    SQL> update xmlsun1 x
    2 set value(x) = updatexml(value(x),'/employees/employee/@id','37')
    3 where existsnode(value(x),'/employees/employee[FirstName = "Tom"]') = 1
    4 /
    1 row updated.
    SQL> update xmlsun2 x
    2 set value(x) = updatexml(value(x),'/employees/employee/@id','37')
    3 where existsnode(value(x),'/employees/employee[FirstName = "Tom"]') = 1
    4 /
    where existsnode(value(x),'/employees/employee[FirstName = "Tom"]') = 1
    ERROR at line 3:
    ORA-00904: "X": invalid identifier
    SQL> update xmlsun2 y
    2 set value(y) = updatexml(value(y),'/employees/employee/@id','37')
    3 where existsnode(value(y),'/employees/employee[FirstName = "Tom"]') = 1
    4 /
    where existsnode(value(y),'/employees/employee[FirstName = "Tom"]') = 1
    ERROR at line 3:
    ORA-00904: "Y": invalid identifier
    SQL>

  • 1.5.4 ora-00904 when opening a package from the connections navigator

    Hi
    I downloaded 1.5.4 for windows and immediately checked to see if this long standing bug has been fixed
    1.5.0.53 New file types not opened as plsql (and now neither a
    However it hasn't so next thing I do is go the connections navigator to open a package which is the workaround for the above bug (any update on when that is going to be fixed would be appreciated).
    If I double click to open a package I get an error message
    ORA-00904: "ATTRIBUTE": invalid identifier
    A single click on a package does not give any error. Double clicking on the same package in 1.5.1 does not give any error message
    Any ideas?
    thanks
    paul
    Edited by: paul.schweiger on Mar 4, 2009 10:36 AM
    Stupidly used the rich text editor which doesn't seem to work too well

    JB,
    There actually is a post from the team in this thread ;-)
    The patch on 3/30 was not scheduled to fix any other errors other than the import issue we encountered. We included an LDAP fix and a 9i performance query issue. The exact bugs fixed are listed in the check for updates detail before you download the fix.
    All bugs can be logged with Metalink, that is the primary place for logging and tracking bugs. The forum is for discussions on how to use the product - for pointers and advice.
    Paul,
    By your long standing bug, I assume you mean that .pks, pkb and .plb files are opened in the PL/SQL Editor. This has been fixed in 1.5.4.
    What has not been done and has been scheduled for 2.0 is the ability to associate any extension with a file and then open that file with the pl/sql editor.
    For all encountering the ora-00904 error, this is specifically related to opening PL/SQL in a 9i database and we have a bug logged for that.
    Sue

Maybe you are looking for

  • PDF created in Illustrator CS5 causing problems in InDesign CS5

    I have created a wallpaper / background in Illustrator CS5 that measures 646mm x 303mm (it's for an A4 folder cover) is in CMYK colour mode and is made up of only 2 layers.  Layer 1 is 3 rectangles - 1 the size of the page and 2 that are 50% of the f

  • Overclocking my i7-860 with an "old" H55-GD65

    Well, it was new to me but I understand by todays standards it is "Old"... forgive me for my budget constrainsts at the moment, but atleast I did buy an MSI, right? OK, that being said, I would like to be a little more educated on the overclocking fu

  • Best practice for dividing IPhoto library

    My wife and I have been using IPhoto since 2004, and are faced with the prospect of dividing the 40,000 photo library into smaller libraries. A Genius Bar session was only partially helpful. Last year we moved IPhoto off the IMac hard drive to an ext

  • Live! Cam Video IM Pro VF0410 Frame Rate Problem

    Hello I'm from Turkey sorry for my English first. I bought this camera yesterday and i tried it on 2 PC.First one is using Win Vista Home Premium (4Gb RAM + Core 2 Duo E6750),second one is Win XP Home (Gb Ram + Pentium M .8). In these PC's i can't ge

  • Cover art lost in Finder

    Since installing iTunes 9.0.2, I have no cover art in Music/iTunes in Finder. The cover art exists in iTunes but not in Finder, there I get a generic iTunes folder with the music note. Now, if I choose a tune in iTunes and choose "Show in Finder" a f