ORA-00904 error in  DBMS_STATS.GATHER_SCHEMA_STATS

Oracle 9.2.0.5 on Solaris
I am trying to run weekly stat gathering on a schema, using DBMS_STAT
I am getting this error on a specific table, wehich aborts the entire process:
ORA-00904: "SEARCHKEYWORKS": invalid identifier
there is no such field. the table creator confirmed that initally he called a field SEARCHKEYWORKS, but later dropped it and created a new one with different name. maybe we did run DBMS_STATS on this table before the change.
when trying to delete stats for this table, using bms_stats.delete_table_stats(ownname=> 'yyyy', tabname=> 'xxxx') I get a ORA-20000, unable to set values for column BRIEFDESCRIPTION, an existing column
this table is referenced from many other tables, so a simple drop/recreate would be a pain. any way to fix this?
Note: I can run the old-style command ANALYZE TABLE xxx COMPUTE STATISTICS just fine; its just the DBMS_STATS package that can't be run on this table.

thanks for the support.
the weekly task that first reported the error was
EXECUTE DBMS_STATS.GATHER_SCHEMA_STATS('SSSSSS',DBMS_STATS.AUTO_SAMPLE_SIZE,FALSE,'FOR ALL COLUMNS SIZE 1',NULL,'DEFAULT',TRUE);
the log file showed the error. where looking which table was last analyzed I gathered it was this table.
then I tried manually only this table, from manager console using their default, which is:
dbms_stats.gather_table_stats(ownname=> 'SSSSSS', tabname=> 'XXXXXX', partname=> NULL);
Hey,
could you post your dbms_stats complete syntax?
Jaffar

Similar Messages

  • Dblink yields ora-00904 error

    I have a stored procedure that executes a query through a dblink to another database. The remote database is Oracle 8.1.7, the local database is Oracle 10.2.0. After making a minor change to the stored procedure, the procedure will not compile, issuing an ORA-00904 error for columns on the remote table being queried. Running the query outside the stored procedure works just fine. Compiling the procedure from our test server (also running Oracle 10.2.0) works fine. Attempts to return to previous code (without the minor change) also gets the same ORA-00904 error.
    Anyone have any ideas regarding the cause of this error?

    I'm going to answer my own question:
    Apparently, links to databases older than 9i can sometimes (perhaps at random) have the local cache in the shared pool get corrupted. The Oracle notes I saw do not describe exactly how the cache gets corrupted. This appears to be a longstanding bug without a solution - only a work around.
    The work around is to flush the cache:
    alter system flush shared pool;
    The most relevant Metalink document I found was
    Note:397658.1
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:1002445788225491569::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,397658.1,1,1,1,helvetica

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

  • Oracle query on dblinked SQL Server tables returns ORA-00904 error

    Hi,
    I have created a dblink to a SQL Server database from Oracle using Generic Connectivity.
    The following query returns ORA-00904 Invalid Identifier error in the WHERE clause (tblEmp.Empno)
    SELECT "EmpNo","EmpName", "DeptName"
    FROM tblEmp@sqlserver,
    tblDept@sqlserver
    WHERE tblDept.DeptNo = tblEmp.Empno
    I had to enclose the column names in double quotes due to case sensitivitiy of the columns, but I can't do the
    same for the WHERE clause.
    1) So, how do I fix this error ?
    2) Also how do I include Deptno column with table alias in the columns list?
    (Deptno is ambiguous in Emp and Dept tables)
    Regards,
    Sam

    Alex
    Because using the aliases all the time can become annoying and lead to disparate standards when used by multiple developers. For a one-off query I would go with aliases in the query but if the linked tables are going to be interrogated extensively I would prefer to create vanilla views of the underlying tables so that the aliases aren't necessary.
    Just my opinion, it feels a bit cleaner to do it this way - you only do the work once in creating the view and then you don't need to worry about the case sensitivity of the linked database. You can also refer to the source in the name of the view so you don't have to think about different source databases with the same table names.
    Cheers
    Ben

  • EA1 - Export result of query to clipboard gives ORA-00904 error

    I ran the following SQL in a SQL Developer worksheet:
    create table EXTCHAR_TEST (TEST_COL VARCHAR2(2000));
    insert into EXTCHAR_TEST(TEST_COL) values ('(ASCII) ABCDEFGHIJKLMNOPQRSTUVWXYZ');
    insert into EXTCHAR_TEST(TEST_COL) values ('(UTF-8) ŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚ');
    insert into EXTCHAR_TEST(TEST_COL) values ('(UTF-8) ŗňŅŒŅ ňŁœ ōř ňʼnŇň łřŔŅ ŇŏŎŅ?');
    select TEST_COL, DUMP(TEST_COL,1016) from EXTCHAR_TEST;
    I then tried to right-click on the results and export them as CSV to the clipboard. Whenever I try this (possibly other ways too, I haven't tried) I get this error:
    An error was encountered performing the requested operation:
    ORA-00904: "DUMP(TEST_COL,1016)": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    * Cause:
    * Action:
    Vendor code 904Error at Line: 2 Column: 16
    Edited by: gclough on Sep 28, 2009 4:03 PM

    Hi Barry,
    I think I'm using the latest "EA1" version, which I downloaded from here:
    [http://www.oracle.com/technology/software/products/sql/index21_EA1.html]
    I have just confirmed using the sample script, that the problem still exists. I was connected to a v9.2.0.5.0 database... if that makes any difference.
    * Run SQL
    * Right-Click on results
    * Export Data -> csv...
    * Clipboard
    * Click "Apply"
    * Error... :-(
    Greg.
    About
    Oracle SQL Developer 2.1.0.62
    Version 2.1.0.62
    Build MAIN-62.61
    Copyright © 2005,2009 Oracle. All Rights Reserved.
    IDE Version: 11.1.1.2.36.54.96
    Product ID: oracle.sqldeveloper
    Product Version: 11.1.1.62.61
    Version
    Component     Version
    =========     =======
    Java(TM) Platform     1.6.0_11
    Oracle IDE     2.1.0.62.61
    Versioning Support     2.1.0.62.61
    Properties
    Name     Value
    ====     =====
    apple.laf.useScreenMenuBar     true
    awt.toolkit     sun.awt.windows.WToolkit
    class.load.environment     oracle.ide.boot.IdeClassLoadEnvironment
    class.load.log.level     CONFIG
    class.transfer     delegate
    com.apple.macos.smallTabs     true
    com.apple.mrj.application.apple.menu.about.name     "SQL_Developer"
    com.apple.mrj.application.growbox.intrudes     false
    file.encoding     Cp1252
    file.encoding.pkg     sun.io
    file.separator     \
    http.agent     Mozilla/5.0 (Java 1.6.0_11; Windows XP 5.1 x86; en_US) ICEbrowser/v6_1_3
    ice.browser.forcegc     false
    ice.pilots.html4.ignoreNonGenericFonts     true
    ice.pilots.html4.tileOptThreshold     0
    ide.AssertTracingDisabled     true
    ide.bootstrap.start     9450010258892
    ide.build     MAIN-62.61
    ide.conf     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.config_pathname     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.debugbuild     false
    ide.devbuild     false
    ide.extension.search.path     sqldeveloper/extensions:jdev/extensions:ide/extensions
    ide.firstrun     true
    ide.java.minversion     1.6.0_04
    ide.launcherProcessId     5404
    ide.main.class     oracle.ide.boot.IdeLauncher
    ide.patches.dir     ide/lib/patches
    ide.pref.dir     C:\Documents and Settings\Greg\Application Data\SQL Developer
    ide.pref.dir.base     C:\Documents and Settings\Greg\Application Data
    ide.product     oracle.sqldeveloper
    ide.shell.enableFileTypeAssociation     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper.exe
    ide.splash.screen     splash.gif
    ide.startingArg0     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper.exe
    ide.startingcwd     C:\Documents and Settings\Greg
    ide.user.dir     C:\Documents and Settings\Greg\Application Data\SQL Developer
    ide.user.dir.var     IDE_USER_DIR
    ide.work.dir     C:\Documents and Settings\Greg\My Documents\SQL Developer
    ide.work.dir.base     C:\Documents and Settings\Greg\My Documents
    java.awt.graphicsenv     sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob     sun.awt.windows.WPrinterJob
    java.class.path     ..\..\ide\lib\ide-boot.jar
    java.class.version     50.0
    java.endorsed.dirs     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\endorsed
    java.ext.dirs     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
    java.home     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre
    java.io.tmpdir     C:\DOCUME~1\Greg\LOCALS~1\Temp\
    java.library.path     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\Program Files\Microsoft IntelliType Pro\;C:\progra~1\Oracle\product\11.1.0\db_1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Progra~1\Oracle\product\11.1.0\client_2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live
    java.naming.factory.initial     oracle.javatools.jndi.LocalInitialContextFactory
    java.runtime.name     Java(TM) SE Runtime Environment
    java.runtime.version     1.6.0_11-b03
    java.specification.name     Java Platform API Specification
    java.specification.vendor     Sun Microsystems Inc.
    java.specification.version     1.6
    java.util.logging.config.file     logging.conf
    java.vendor     Sun Microsystems Inc.
    java.vendor.url     http://java.sun.com/
    java.vendor.url.bug     http://java.sun.com/cgi-bin/bugreport.cgi
    java.version     1.6.0_11
    java.vm.info     mixed mode
    java.vm.name     Java HotSpot(TM) Client VM
    java.vm.specification.name     Java Virtual Machine Specification
    java.vm.specification.vendor     Sun Microsystems Inc.
    java.vm.specification.version     1.0
    java.vm.vendor     Sun Microsystems Inc.
    java.vm.version     11.0-b16
    jdbc.driver.home     /C:/progra~1/Oracle/product/11.1.0/db_1/
    jdbc.library     /C:/progra~1/Oracle/product/11.1.0/db_1/jdbc/lib/ojdbc6.jar
    line.separator     \r\n
    oracle.home     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper
    oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG     true
    oracle.jdbc.Trace     true
    oracle.translated.locales     de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
    oracle.xdkjava.compatibility.version     9.0.4
    orai18n.library     /C:/progra~1/Oracle/product/11.1.0/db_1/jlib/orai18n.jar
    os.arch     x86
    os.name     Windows XP
    os.version     5.1
    path.separator     ;
    reserved_filenames     con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
    sqldev.debug     false
    sun.arch.data.model     32
    sun.boot.class.path     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\resources.jar;C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\rt.jar;C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\sunrsasign.jar;C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\jsse.jar;C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\jce.jar;C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\lib\charsets.jar;C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\classes
    sun.boot.library.path     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\jdk\jre\bin
    sun.cpu.endian     little
    sun.cpu.isalist     pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
    sun.desktop     windows
    sun.io.unicode.encoding     UnicodeLittle
    sun.java2d.ddoffscreen     false
    sun.jnu.encoding     Cp1252
    sun.management.compiler     HotSpot Client Compiler
    sun.os.patch.level     Service Pack 3
    svnkit.sax.useDefault     true
    user.country     US
    user.dir     C:\Program Files\Oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper\bin
    user.home     C:\Documents and Settings\Greg
    user.language     en
    user.name     Greg
    user.timezone     America/Los_Angeles
    user.variant     
    windows.shell.font.languages     
    Extensions
    Name     Identifier     Version     Status
    ====     ==========     =======     ======
    Check For Updates     oracle.ide.webupdate     11.1.1.2.36.54.96     Loaded
    Code Editor     oracle.ide.ceditor     11.1.1.2.36.54.96     Loaded
    Database Connection Support     oracle.jdeveloper.db.connection     11.1.1.2.36.54.96     Loaded
    Database Object Explorers     oracle.ide.db.explorer     11.1.1.2.36.54.96     Loaded
    Database UI     oracle.ide.db     11.1.1.2.36.54.96     Loaded
    Diff/Merge     oracle.ide.diffmerge     11.1.1.2.36.54.96     Loaded
    Extended IDE Platform     oracle.javacore     11.1.1.2.36.54.96     Loaded
    External Tools     oracle.ide.externaltools     11.1.1.2.36.54.96     Loaded
    File Support     oracle.ide.files     11.1.1.2.36.54.96     Loaded
    File System Navigator     oracle.sqldeveloper.filenavigator     11.1.1.62.61     Loaded
    Help System     oracle.ide.help     11.1.1.2.36.54.96     Loaded
    History Support     oracle.jdeveloper.history     11.1.1.2.36.54.96     Loaded
    Import/Export Support     oracle.ide.importexport     11.1.1.2.36.54.96     Loaded
    Index Migrator support     oracle.ideimpl.indexing-migrator     11.1.1.2.36.54.96     Loaded
    JDeveloper Runner     oracle.jdeveloper.runner     11.1.1.2.36.54.96     Loaded
    Log Window     oracle.ide.log     11.1.1.2.36.54.96     Loaded
    Navigator     oracle.ide.navigator     11.1.1.2.36.54.96     Loaded
    Object Gallery     oracle.ide.gallery     11.1.1.2.36.54.96     Loaded
    Object Viewer     oracle.sqldeveloper.oviewer     11.1.1.62.61     Loaded
    Oracle Data Modeler Reports     oracle.sqldeveloper.datamodeler_reports     11.1.1.62.61     Loaded
    Oracle Database Browser     oracle.sqldeveloper.thirdparty.browsers     11.1.1.62.61     Loaded
    Oracle IDE     oracle.ide     11.1.1.2.36.54.96     Loaded
    Oracle SQL Developer     oracle.sqldeveloper     11.1.1.62.61     Loaded
    Oracle SQL Developer Data Modeler Viewer     oracle.datamodeler     2.0.0.574     Loaded
    Oracle SQL Developer Extras     oracle.sqldeveloper.extras     1.1.1.62.61     Loaded
    Oracle SQL Developer Migrations     oracle.sqldeveloper.migration     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - Antlr3 Translation Core     oracle.sqldeveloper.migration.translation.core_antlr3     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - DB2     oracle.sqldeveloper.migration.db2     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - Microsoft Access     oracle.sqldeveloper.migration.msaccess     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - MySQL     oracle.sqldeveloper.migration.mysql     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - SQLServer     oracle.sqldeveloper.migration.sqlserver     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - Sybase     oracle.sqldeveloper.migration.sybase     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - Teradata     oracle.sqldeveloper.migration.teradata     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - Translation Core     oracle.sqldeveloper.migration.translation.core     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - Translation Db2     oracle.sqldeveloper.migration.translation.db2     11.1.1.62.61     Loaded
    Oracle SQL Developer Migrations - Translation UI     oracle.sqldeveloper.migration.translation.gui     11.1.1.62.61     Loaded
    Oracle SQL Developer Reports     oracle.sqldeveloper.report     11.1.1.62.61     Loaded
    Oracle SQL Developer SearchBar     oracle.sqldeveloper.searchbar     11.1.1.62.61     Loaded
    Oracle SQL Developer TimesTen     oracle.sqldeveloper.timesten     2.0.0.62.61     Loaded
    Oracle SQL Developer Unit Test     oracle.sqldeveloper.unit_test     11.1.1.62.61     Loaded
    Oracle SQL Developer Worksheet     oracle.sqldeveloper.worksheet     11.1.1.62.61     Loaded
    Oracle XML Schema Support     oracle.sqldeveloper.xmlschema     11.1.1.62.61     Loaded
    PROBE Debugger     oracle.jdeveloper.db.debug.probe     11.1.1.2.36.54.96     Loaded
    Peek     oracle.ide.peek     11.1.1.2.36.54.96     Loaded
    Persistent Storage     oracle.ide.persistence     11.1.1.2.36.54.96     Loaded
    QuickDiff     oracle.ide.quickdiff     11.1.1.2.36.54.96     Loaded
    Replace With     oracle.ide.replace     11.1.1.2.36.54.96     Loaded
    Runner     oracle.ide.runner     11.1.1.2.36.54.96     Loaded
    Snippet Window     oracle.sqldeveloper.snippet     11.1.1.62.61     Loaded
    Sql Monitoring Project     oracle.sqldeveloper.sqlmonitor     11.1.1.62.61     Loaded
    Tuning     oracle.sqldeveloper.tuning     11.1.1.62.61     Loaded
    VHV     oracle.ide.vhv     11.1.1.2.36.54.96     Loaded
    Versioning Support     oracle.jdeveloper.vcs     11.1.1.2.36.54.96     Loaded
    Versioning Support for Subversion     oracle.jdeveloper.subversion     11.1.1.2.36.54.96     Loaded
    Virtual File System     oracle.ide.vfs     11.1.1.2.36.54.96     Loaded
    Web Browser and Proxy     oracle.ide.webbrowser     11.1.1.2.36.54.96     Loaded
    audit     oracle.ide.audit     11.1.1.2.36.54.96     Loaded
    oracle.ide.indexing     oracle.ide.indexing     11.1.1.2.36.54.96     Loaded
    Edited by: gclough on Sep 30, 2009 4:39 PM

  • Heterogeneous Services ODBC to MS SQLSvr - ORA-00904 error

    Hello, I have successfully setup a heterogeneous Services ODBC to MS SQLSvr using the steps outlined at http://www.orafusion.com/art_orahs.htm.
    My problem is, the only queries that run without errors are SELECT * FROM tablename@xxx. When I try SELECT colname FROM tablename@xxx I get an ORA-00904: "colname": invalid identifier. Any thoughts?
    Also, will I be able to update MS SQLSvr tables using this link?
    Thanks.

    Hello, Your suggestion worked. Even though all the column_names are lower case, if I surrounded the column names with double quotes the query would work.
    Another question. I'm wanting to update a SQLServer table with data from a Oracle table using a query like:
    INSERT INTO sql_table@xxx
    SELECT * FROM oracle_table ;
    Is this possible? I'm getting a "ORA-02025: all tables in the SQL statement must be at the remote database" error message which looks like I can't.
    Thanks.

  • Ora-00904 error during Export

    Hi ,
    I am facing a problem in export utility 8i database, this is occuring after i installed the packaes required for java stored procedure, any suggestion is appreciated
    L:\>exp userid=ubs/ubs owner=scott file=test.dmp log=test.log
    Export: Release 8.1.7.0.0 - Production on Tue Jul 9 13:37:31 2002
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Connected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - Production
    Export done in WE8ISO8859P1 character set and UTF8 NCHAR character set
    server uses UTF8 character set (possible charset conversion)
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user SCOTT
    . exporting object type definitions for user SCOTT
    About to export SCOTT's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export SCOTT's tables via Conventional Path ...
    . . exporting table TEMP 0 rows exported
    . exporting synonyms
    EXP-00008: ORACLE error 904 encountered
    ORA-00904: invalid column name
    EXP-00000: Export terminated unsuccessfully
    thankyou in advance for a reply
    Regards
    bala

    It might be that you have not ran the exp script to build the correct views.
    Some applications build tables with double quotes around them to force the table or view names to lower case. exp doesn't play well with that. You may have to go through and rename all the objects that were creates case specific.

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

    Hi ,
    I am trying to run the following PL/SQL Block and have trapped error code -904( for invalid column name) in the exception section block.
    The column name in the select query does not exist in the emp table and as per my understanding since I have an exceptiion handler for this error it should be handled in Exception Block.
    DECLARE
    invalid_column exception;
    pragma exception_init (invalid_column,-00904);
    no number;
    BEGIN
    select empn into no from emp
    where ename='king';
    EXCEPTION
    when invalid_column then
    dbms_output.put_line(Column ane does not exist)
    end;
    1) Can You please let me know why this is not getting caught in Exception handler
    *2) What changes should I make in Exception handler section so that Invalid column name is handled in the program*
    Thanks and regards
    Harmeet

    Check this:
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2  invalid_column EXCEPTION;
      3  PRAGMA EXCEPTION_INIT(invalid_column,-00904);
      4  v_col_check NUMBER := 0;
      5  v_col_name VARCHAR2(10) := 'OWNE';
      6  BEGIN
      7  select COUNT(*) INTO v_col_check
      8  from all_tab_cols
      9  where table_name = 'ALL_OBJECTS'
    10  AND column_name = v_col_name;
    11  IF (v_col_check = 0) THEN
    12  RAISE invalid_column;
    13  END IF;
    14  EXCEPTION
    15  WHEN invalid_column THEN
    16  DBMS_OUTPUT.PUT_LINE('Column '||v_col_name ||' does not exist in table all_objects');
    17* END;
    SQL> /
    Column OWNE does not exist in table all_objects
    PL/SQL procedure successfully completed.
    SQL> This way you can check if the column is valid or not in case you are dynamically getting the column names

  • ORA-00904 error while export table with CLOB

    All,
    I'm trying to export from Oracle Client 8.0.4 an specific Oracle 9i R2 schema, but this error appears. This error is related with tables that have CLOB field types, because schemas with tables without this field type can be exported with no error. I've already run the catexp.sql script, but it haven't solved this problem.
    Does anyone can help me?
    Thanks,
    Davi

    You can try performing the import of the dump to see if it would work with 8i client or the 8.0.4 client.
    if not, you may not be able to use this method to move data into 8.0.4 database that is no longer spported by current tools.
    you may then want to try use other techniques like dumping tables into flat files and then using SQL*Loader to load into 8.0.4.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:88212348059#14506966201668

  • Having issues with a left join, getting ORA-00904 error

    Ok this is something very similar to what I am facing, but dumbed down. None of these columns or tables names exist in real life (Very paranoid company I work for, understandable though) but the fundamental problem I am having is like below.
    Basically I know I could have done something similar to this is MS SQL (Or am I dreaming?). If I am right or wrong I need to know a way around this.
    Obviously if you comment out the "CAL.WEEK_SINCE_2005" and "AND CUST.week_since_2005 = CAL.WEEK_SINCE_2005" it would work. But I really need it to display the date as well. So it can be group'ed by week since 2005.
    I will be joining other statements to this. I am hoping on doing this in one select statement instead of creating multiple tables as I am now. All the other joined tables will follow a VERY similar layout to this. So something like this is need to obtain the look.
    When ran I get the following error.
    I look forward to learning what I did wrong and how I can fix it. :)
    select ORG.ORGANIZATION_NAME,
    CUST.CUST_COUNT,
    CAL.WEEK_SINCE_2005
    FROM organization ORG,
    calendar CAL
    LEFT JOIN (
    SELECT CAP.CURRENT_STORE,
    CALEN.week_since_2005,
    count(CAP.inactive_date) CUST_COUNT
    FROM CUST_AGREE_PAST CAP,
    calendar CALEN
    WHERE CAP.active_date is not null
    and CAP.inactive_code in ('T')
    and CAP.inactive_date between '01-sep-07' and sysdate
    and CAP.INACTIVE_DATE = CALEN.CALENDAR_DATE
    and CAP.RSN_CODE_ID in (select rsn_code_id from reasons where title in ('FAIL', 'NO CALL'))
    GROUP BY CAP.CURRENT_STORE,
    CALEN.week_since_2005) CUST
    ON PO.CURRENT_STORE = ORG.ORGANIZATION_NAME
    AND CUST.week_since_2005 = CAL.WEEK_SINCE_2005

    Just noticed a problem (there might be others):
    FROM organization ORG,
    calendar CAL
    LEFT JOIN (You cannot do that - you are mixing Oracle and ANSI join syntax. You have to do one or the other:
    FROM organization ORG
    JOIN calendar CAL on (ORG.col = CAL.col)
    LEFT JOIN (....)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Getting ORA-00904 ERROR

    Hi,
    select statmnnt is giving output but while inserting is failing
    getting B: MGR_NUM invalid identifier
    NSERT INTO assc ( b.assc_nm,
              b.STATUS_DT,
              b.STATUS_ID,
              b.first_nm,
              b.last_nm,
              b.curr_title_nm,
              b.curr_field_sales_ind,
              b.MGR_NM)
              select c.assc_nm,
              c.status_dt,
    decode(c.STATUS,'ACTV',1,'INAC',2),
    c.first_nm,
    c.last_nm,
    c.curr_title_nm,
    'N',
    c.MGR_NM
              from ASSCGENTABLE_NEW c
              where c.flag='I';

    should be...
    INSERT INTO assc (
    assc_nm,
    STATUS_DT,
    STATUS_ID,
    first_nm,
    last_nm,
    curr_title_nm,
    curr_field_sales_ind,
    MGR_NM)
    select c.assc_nm,
    c.status_dt,
    decode(c.STATUS,'ACTV',1,'INAC',2),
    c.first_nm,
    c.last_nm,
    c.curr_title_nm,
    'N',
    c.MGR_NM
    from ASSCGENTABLE_NEW c
    where c.flag='I';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • JDBC Receiver adapter-java.sql.SQLException: ORA-00904: "BATCH_ID": invalid

    Hi
    I am trying insert rows in Oracle database using JDBC receiver adapter setup in PI 7.1. However this receiver adapter is throwing following exception.
    Delivering the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PRADEEP_OTC_ORDERS' (structure 'statement'): java.sql.SQLException: ORA-00904: "BATCH_ID": invalid identifier .
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:mt_sql_writer xmlns:ns0="http://rdbms_poc">
    <statement>
         <dbtablename action="INSERT">
                <table>PRADEEP_OTC_ORDERS</table>
              <access>
                     <order_id>19126</order_id>
                     <version>1</version>
                     <batch_id>132</batch_id>
                </access>
           </dbtablename>
    </statement>
    </ns0:mt_sql_writer>
    PRADEEP_OTC_ORDERS table has just 3 columns as specified the access segment. However I stil get this ORA-00904 error message.
    Any idea on what could be wrong.?
    Thanks
    -Pradeep

    Hi All,
    Thanks a lot for responding...
    I verified the table structure, table just contains those 3 coulms all varchar type.
    I modified the column name as well, But was still getting ORA-00904. Then I went directly to the the database and executed below insert statement,
    insert into PRADEEP_OTC_ORDERS (mps_order_id, mps_version,mps_batch_id) Values(1,2,3)
    I got exact SQL Error: ORA-00904: "MPS_BATCH_ID": invalid identifier.
    So ISAP JDBC adapter is not enclosing the string values in quotes.
    SAP documentation says it puts quotes for values and treats everything as string(text).
    Anybody has any idea, why JDBC receiver adapter not enclosing the values in quotes?
    Thanks
    -Pradeep

  • Sort on views in data grid (ORA-00904)

    Can anyone else confirm that this happens, or has been highlighted previously:
    1. Connect to any schema containing views
    2. Expand the views tree
    3. Click on any view
    4. Click on the data tab to display the data grid
    5. Click the sort button
    6. Select any column (must not exist in view selected later)
    7. Click "Apply Sort"
    8. Now click on any other view that does not contain a column of the same name as the one chosen as the sort column previously.
    I receive an ORA-00904 error. The only way I can clear this is to close down the data grid tab item, and re-open it.
    Cheers
    Carl
    DBA - Dunfermline Building Society

    Yes.
    Login as a DBA.
    Go to Other Users - SYS - Views - More - Filter - %% - OK
    Click on DBA_USERS - DATA - Sort - USERNAME - Apply Sort
    Click on DBA_USTATS
    --> ORA-00904 "USERNAME". invalid identifier.
    Notice that the columns in the data view have not changed.
    Close the tab and click on DBA_USTATS fixes the problem (no data anyway).
    Click on freeze view (the push pin) and click on DBA_USTATS fixes the problem.
    These are two easy workarounds, but it is confusing the first time you encounter it.

  • Oracle 8i full export fails (ORA-00904)

    Hello Guru's.
    I encounter this problem when i try a full export.
    Database version is 8.1.7.4 and the export utility is also 8.1.7.4
    When i try exporting it generates a ORA-00904 error. I traced on this error and see the following:
    *** SESSION ID:(8.57) 2007-03-21 10:33:53.738
    *** 2007-03-21 10:33:53.738
    ksedmp: internal or fatal error
    ORA-00904: invalid column name
    Current SQL statement for this session:
    SELECT GRANTOR, GRANTORID, GRANTEE, PRIV, WGO, ISDIR, TYPE FROM SYS.EXU8GRN WHERE OBJID = :1 ORDER BY WGO DESC, SEQUENCE
    I checked the compatible parameter:
    (compatible string 8.1.7)
    Any reply greatly appreciated.

    Yeah, well, maybe running catexp.sql will solve that .....
    And it did.
    But more stuff is coming up, proberly when i try to import this thingie into Oracle 10g.
    Thanks, and reply!

Maybe you are looking for

  • Inventory Cube Loading - Questions....

    This is the process I intend to follow to load InfoCube 0IC_C03 and the questions therein. I have the "how to handle inventory scenarios" document, so please don't suggest I read that. 1A) Delete Set-up tables for application 03 1B) Lock Users 1C) Fl

  • BAPI - CSAI_BOM_CREATE  error

    Dear Experts., I created a report  for uploading BOM equipments using BAPI - CSAI_BOM_CREATE . It is working fine in IDES System , but when I used the same in DEV System It is Giving Error. below is my code., LOOP AT IT_FINAL INTO wa_final. WA_FINAL1

  • Automatic thread creation?

    Hi, While linking a 3rd party library I noticed that my single threaded program was being recognized as multi-threaded by workshop & also the executable had 4 threads running. After some investigation, I realized that this was due to the library havi

  • Mi iphone esta reportado por imei

    mi iphone esta reportado por imei

  • Easy Way To Have Several Tracks End at Same Time?

    Let's say you have 4 tracks of strings, and their final notes end at slightly different times. Is there a quick command for ending them all together?' Thanks Tom