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

Similar Messages

  • Help on Merge Statement ,I got 'ORA-00904: invalid column name' Error

    Pls help
    In Oracle 9i i implement the following qry
    MERGE INTO jobs A
    USING (select order_no,jOB_SEQ_NO from jobs_dlt) B
    ON (A.ORDER_NO = B.ORDER_NO and A.JOB_SEQ_NO =B.JOB_SEQ_NO )
    WHEN MATCHED THEN
    UPDATE SET
              A.ORDER_NO= B.ORDER_NO ,
              A.JOB_SEQ_NO= B.JOB_SEQ_NO           
    WHEN NOT MATCHED THEN
    INSERT (
              A.JOB_SEQ_NO ,
              A.ORDER_NO
    VALUES (
              B.JOB_SEQ_NO ,
              B.ORDER_NO
    but i got 'ORA-00904: invalid column name' Error
    JOBS table Contain the above Column
    how i implement the Merge Statment
    Thanks in advance
    By
    Sekar

    I seem to recall this error being spuriously (well unhelpfully) thrown if you tried to UPDATE a key that you used in the ON clause, but I could be mistaken.
    For us to recreate this you would need to supply the exact version and scripts to create the tables in question.

  • ORA-00904: invalid column name - trying to sum

    Hi all
    probably somrthing really stupid and easy that I'm missing but here goes
    I am trying to gather data from 3 tables, 1st one is stock master file - all records are unique key
    2nd table is barcodes, product key can occur 2 / 3 times - one for each barcode that is assigned to a product.
    3rd table is warehouse stock, again key can occur a few times as there is a key for each stock record
    I need to pull the data from 1st two tables and sum the total of warehouse stock for each record pulled.
    I know I will get 2 or 3 records for each stock item as each record will return with a different barcode. what I'm trying to eliminate is returning the same records again with a separate row for each set of warehouse stock records.
    If I run
    select rmdept||','||rmstyl||','||rmcolr||','||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
    a.rmcomq, b.rdcstk
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+)
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk)
    order by rmdept, rmstyl, rmcolr
    I get all the data I want, but duplicate rows for every stock record
    53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,1
    53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,228
    the last column is the stock record
    I would like to return just one row showing warehouse stock as 229
    If I run
    select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||sum(rdcstk)
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, b.rdcstk
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+))
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk
    order by rmdept, rmstyl, rmcolr
    sum on rdcstk in first select statement, I still get two records returned
    00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,-1
    00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,0
    If I change sum to 2nd select statement and leave the group by statement outside the brackets
    select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, sum(b.rdcstk)
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+))
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk
    order by rmdept, rmstyl, rmcolr
    I get
    rmmrch, rmcomq, rdcstk
    ERROR at line 14:
    ORA-00904: invalid column name
    If I put the group by inside the brackets
    select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
    a.rmcomq, sum(b.rdcstk)
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+)
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk)
    order by rmdept, rmstyl, rmcolr
    I get
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    ERROR at line 3:
    ORA-00904: invalid column name
    I get the same even if I change the field names in the group by to a.rmdept etc.
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    ERROR at line 3:
    ORA-00904: invalid column name
    any help, hints or tips greatly appreciated. this is an 8.1.7 database
    Thanks
    Janet

    Thanks dnikiforov
    still get the
    select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||rmdesc||','||rmac
    ERROR at line 1:
    ORA-00904: invalid column name
    I think its a problem with trying to select on the unique, anyway I accidentally posted a couple of threads for this and it has now been resolved by
    select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||
    a.rmdesc||',||a.rmacod||','||a.rmcdes||','||a.rmzdes||','||a.rmsupp||','||a.rmsspr||','||a.rmlcos||','||
    c.rsbarc||','||a.rmpord||','||a.rmmrch||','||a.rmcomq||','||sum(b.rdcstk)
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+)
    and a.rmstyl = c.rsstyl(+)
    and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+)
    and a.rmdept = b.rddept(+)
    and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+)
    group by a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr, a.rmlcos,
    c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq
    as I dont need to use the unique because the sum does it for me
    Thanks again for speedy help

  • Default Errors= ORA-00904: invalid column name

    Hi,
    I nto expert in plsql , whenever i'm trying to run procedure or function mostly i got this same error and even i didn't view the error using
    show errors ,
    show errors procedure|function name
    CREATE OR REPLACE PROCEDURE SEND_MAIL (
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20000: ORA-00904: invalid column name
    ORA-06512: at line 13
    plz explain why this error often display
    regards
    venki

    Hi,
    unless just give me a suitable thread, please...

  • ORA-00904: Invalid column name

    Hi all,
    some of my OWB generated packages keep returning error
    ORA-00904: Invalid column.
    When I check run of such packages in OWB Audit Viewer:
    1. Selected and inserted no of records is OK
    2. There is one error reported the one mentioned above. Unfortunately there is nothing more than "Batch insert" and ORA error no and error code in Error Details
    The number of columns and their types and all constraints are the same in DB and OWB repository for both tables that take part in such mapping.
    Do you have some ideas where is the problem?
    Thanks
    Petr

    try to produce a trace file

  • Error No. ORA-00904: invalid column name

    I have an error in production AP->Setup->Options->financials Or
    Payables As follows.the SELECT Statement looks for a
    Fields: ‘EXPENSE_CLEARING_CCID’in the
    Table : ‘FINANCIALS_SYSTEM_PARAMETERS’.
    SELECT
    SET_OF_BOOKS_ID,FUTURE_PERIOD_LIMIT,ACCTS_PAY_CODE_COMBINATION_ID
    PREPAY_CODE_COMBINATION_ID,DISC_TAKEN_CODE_COMBINATION_ID,RATE_VA
    R_GAIN_CCID,
    RATE_VAR_LOSS_CCID,EXPENSE_CLEARING_CCID,REQ_ENCUMBRANCE_FLAG,REQ
    ENCUMBRANCETYPE_ID,
    RESERVE_AT_COMPLETION_FLAG,PURCH_ENCUMBRANCE_FLAG,PURCH_ENCUMBRAN
    CE_TYPE_ID,
    INV_ENCUMBRANCE_TYPE_ID,BUSINESS_GROUP_ID,EXPENSE_CHECK_ADDRESS_F
    LAG,
    USE_POSITIONS_FLAG,TERMS_ID,PAY_DATE_BASIS_LOOKUP_CODE,
    TERMS_DATE_BASIS,PAYMENT_METHOD_LOOKUP_CODE,RECEIPT_ACCEPTANCE_DA
    YS,
    ALWAYS_TAKE_DISC_FLAG,EXCLUSIVE_PAYMENT_FLAG,SHIP_TO_LOCATION_ID,
    BILL_TO_LOCATION_ID,FOB_LOOKUP_CODE,SHIP_VIA_LOOKUP_CODE,INVENTOR
    Y_ORGANIZATION_ID,
    FREIGHT_TERMS_LOOKUP_CODE,RFQ_ONLY_SITE_FLAG,HOLD_UNMATCHED_INVOI
    CES_FLAG,
    USER_DEFINED_VENDOR_NUM_CODE,MANUAL_VENDOR_NUM_TYPE,VAT_CODE,
    VAT_COUNTRY_CODE,VAT_REGISTRATION_NUM,LAST_UPDATE_DATE,
    LAST_UPDATED_BY,LAST_UPDATE_LOGIN,CREATION_DATE,CREATED_BY,
    ROWID FROM FINANCIALS_SYSTEM_PARAMETERS
    WHERE 1=1
    thanks fo coopration
    [email protected]

    In order for testtune to create a function-based index on a table in hrdmadm's schema that uses a function in testtune's schema, testtune must have the system privilege GLOBAL QUERY REWRITE and SELECT privileges on hrdmadm's table, and hrdmadm must have execute privileges on testtune's function, and the function name must be prefaced with the schema name when creating the index.
    So, have someone with DBA privileges:
    GRANT GLOBAL QUERY REWRITE TO testtune;
    Have hrdmadm:
    GRANT SELECT ON bkg_empl_asgnmt to testtune;
    Have testtune:
    GRANT EXECUTE ON test_func_index to hrdmadm;
    Then, testtune can:
    create index testtune.test_func_index on
    hrdmadm.bkg_empl_asgnmt(substr(testtune.CalcDistFctUnit(GHRS_INTERNAL_EMPL_ID_NO, HOME_ORGANIZATION, EFFECTIVE_DATE, HOME_AGENCY),1,5))

  • Sometimes ORA-00904: invalid column

    Hello,
    Some times when i am running a query I get 'ORA-00904: invalid column name'. Next times i run exactly the same query the query runs well for a few times. And in an unpredictable way, exactly the same query fails again.
    I am using Oracle 8i 8.1.7
    Can someone help me out?

    The error does not occur in just a single query. There are multiple query's in whitch the error sometimes occurs. We have been looking for similarity's in the query's, but we haven't found one so far. It seems to be the error does occur more often in query's wich are using a databaselink.
    The error does also occur in update statements.
    This is an example query:
    SELECT DISTINCT
    zt.rowid,
    zt.id,
    zt.begindatum_tim,
    zt.zorgtraject_id,
    zt.SSPC_ZORGTYPE_ID,
    stp_lees_dbc(zrgt.ID, zrgt.initieel_sspc_id, zt.ID)AS dbc,
    stp_lees_dbc_code(zrgt.ID, zrgt.initieel_sspc_id, zt.ID) AS dbc_code
    FROM
    bav_epd_zorgtrajecten zrgt
    ,bav_epd_ztr_zorgtypen zt
    WHERE
    zrgt.ID = :parzorgtrajectid
    AND zrgt.verwijderd_bln = 'N'
    AND zrgt.ID = zt.zorgtraject_id

  • When Import get Error-00904 Invalid Column Name

    Hi all,
    I'm using DI Premium 3.0 with Oracle 10.2.0.1.0 repository. I'm trying to connect Oracle 8.1.4.7.1 (8i) but when i going to import tables get Error-00904 Invalid Column Name. If i connect to Oracle 10.2.0.4.0 don't get error.
    Trying from DI XI R2 (11.7) with Oracle 10.2.0.2.0 repository, to connect Oracle 8.1.4.7.1 (8i) don´t get error!
    Is error from Oracle repository version?
    Thanks in advance.
    Jorge

    Hi Manoj,
    This is the output:
    SQL> desc all_tab_columns
    Name                                      Null?    Type
    OWNER                                      NOT NULL      VARCHAR2(30)
    TABLE_NAME                             NOT NULL      VARCHAR2(30)
    COLUMN_NAME                          NOT NULL      VARCHAR2(30)
    DATA_TYPE                                           VARCHAR2(106)
    DATA_TYPE_MOD                                           VARCHAR2(3)
    DATA_TYPE_OWNER                                         VARCHAR2(30)
    DATA_LENGTH                           NOT NULL      NUMBER
    DATA_PRECISION                                          NUMBER
    DATA_SCALE                                                   NUMBER
    NULLABLE                                                     VARCHAR2(1)
    COLUMN_ID                                 NOT NULL      NUMBER
    DEFAULT_LENGTH                                          NUMBER
    DATA_DEFAULT                                            LONG
    NUM_DISTINCT                                                 NUMBER
    LOW_VALUE                                                    RAW(32)
    HIGH_VALUE                                                   RAW(32)
    DENSITY                                                      NUMBER
    NUM_NULLS                                                    NUMBER
    NUM_BUCKETS                                             NUMBER
    LAST_ANALYZED                                           DATE
    SAMPLE_SIZE                                                  NUMBER
    CHARACTER_SET_NAME                                    VARCHAR2(44)
    CHAR_COL_DECL_LENGTH                                 NUMBER
    GLOBAL_STATS                                            VARCHAR2(3)
    USER_STATS                                                   VARCHAR2(3)
    AVG_COL_LEN                                             NUMBER
    Thanks for your help.
    Jorge

  • Error ora-604 ora-904 invalid column name

    Someone knows how to fix this problem?
    Error ora-604 ora-904 invalid column name.

    Asif, to add another question to the list of things to check. Is the version of the exp utility you are using to perform the export operation the same version as the database? If not, that would explain the error.
    If you are trying to export using a newer version of the export utility that generally will not work. You should switch to using the db version.
    If you are exporting using an older version because the target is an older version then usually you need to run the catexp# where # is the version number script for the target version that Oracle provides in the $ORACLE_HOME/rdbms/admin directory.
    HTH -- Mark D Powell --

  • Invalid Column Name on select from materialized view?

    Hey all, I have created this materialized view for my java to select from. For some reason when I try to select from it, I get invalid column name. Here is my mat view statement in its simplest form:
    create materialized view mv_pgridtcevcluster_property as
    select distinct clustername_ as "OBJECT_ID", CLUSTERNAME_, LICENSEMODE_
    from p_gridtcevcluster p
    order by clustername_;
    Now when I run my select statement from jdbc:
    SQL: select object_id from MV_PGRIDTCEVCLUSTER_PROPERTY
    java.sql.SQLException: Invalid column name
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3319)
         at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1926)
         at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
         at com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSet.java:3342)
         at historian.objects.mgmt.udrManagerTest.gatherObjects(udrManagerTest.java:73)
    Anyone have issues with this before? It seems to throw the error sporatically, any help would be much appreciated!
    Regards,
    TimS
    Edited by: TimS on Mar 30, 2009 1:54 PM
    Nevermind, figured it out. Was using wrong column name identifier when picking values from resultset.

    Since you have "OBJECT_ID" in quotes, Oracle stores the column name literally and case sensitively, and the column name must be capitalized when referenced.
    From a regular sql*plus window, try
    select object_id from mv_pgridtcevcluster_property;
    select OBJECT_ID from mv_pgridtcevcluster_property;
    select "OBJECT_ID" from mv_pgridtcevcluster_property;What is the result from each of them?

  • Invalid column name - fixed by inserting a carriage return - Why?

    I'm writing some JSP pages and am executing a statement that retrieves values from three tables.
    When executing the statement I receive the error
    java.sql.SQLException: Invalid column name
    I just want to state here that ALL the column names are definitely correct. I attempted to isolate the problem using my SQL*Plus Interface.
    When copying and pasting the SQL that was used (I put the SQL statement into the HTML to allow me to do this) into SQL*Plus it also come up with the error. I found that if I broke up the statement it would run. Specifically if I placed a carriage return (by hitting enter) prior to the 'A' of the AND operator and then copied and pasted into SQL*Plus it would work!
    I thought the problem was related to bad syntax in the outer join operator. But removal of the outer join operator and making it a EQUI JOIN situation still gave the same results. I tried the use of brackets to 'help' the DB engine figure it out - silly I know, but it didn't work anyway :(
    I've tried this out on UNIX in SQL*Plus where the query was on one line and it worked fine. I've tried it on Oracle 8.1.5 SQL*Plus & Oracle 8.1.7 SQL*Plus on Win2000 and WinNT and no go.
    It has also been tested on an Oracle 7.3.4 DB and no go either.
    Remember I'm only using SQL*Plus to find out why it is not working - I'm actually attempting to execute this via JDBC (classes12.zip Oracle9 version) in my JavaBean. I can't place a carriage return to 'fix' the problem, and I'm assuming that I shouldn't either.
    I've pasted the SQL below (both non-working and working versions). I was going to paste the output of DESC on the associated tables should you too would rule out a mispelled column name, but I didn't want to put anyone off with a long post.
    If you can provide any advice I would be very appreciative.
    Darren James
    Show Me Technology
    SQL> SELECT UNIT.Asset_Number,Model,PERSON.Novell_User_Name FROM
    UNIT, UNIT_USERS, PERSON
    2 WHERE UNIT.Hardware_Reference_Number =
    UNIT_USERS.Hardware_Reference_Number(+) AND UNIT_USERS
    .Novell_User_Name = PERSON.Novell_User_Name (+) ORDER BY Make,
    Model, Asset_Number,Serial_Number,
    UNIT.Hardware_Reference_Number,Unit_Type,PERSON.Last_Name,PERSON.Fi
    rst_Name,PERSON.Novell_User_Name;
    3 /
    WHERE UNIT.Hardware_Reference_Number =
    UNIT_USERS.Hardware_Reference_Number(+) AND UNIT_USERS.Novel
    ERROR at line 2:
    ORA-00904: invalid column name
    REM -- Using the one with an return prior to the AND
    SQL> SELECT UNIT.Asset_Number,Model,PERSON.Novell_User_Name FROM
    UNIT, UNIT_USERS, PERSON
    2 WHERE UNIT.Hardware_Reference_Number =
    UNIT_USERS.Hardware_Reference_Number(+)
    3 AND UNIT_USERS.Novell_User_Name = PERSON.Novell_User_Name
    (+) ORDER BY Make, Model,
    4 Asset_Number,Serial_Number,
    5
    UNIT.Hardware_Reference_Number,Unit_Type,PERSON.Last_Name,PERSON.Fi
    rst_Name,PERSON.Novell_User_
    Name;
    ASSET_NUMBER
    MODEL
    NOVELL_USE
    10023445
    desktop raider
    tabisho
    10023445
    desktop raider
    pjblee
    100349864
    VEi8
    SQL>

    Ok. I feel ashamed that the answer was so simple and not the
    problem I thought it was. But in the interests of perhaps
    preventing someone else doing the same silly thing....
    The error was caused by using a wrong name when 'getting' the
    values int the return ResultSet object. (eg using getString
    ("s.Some_Name") when it should have been getString
    ("s.Another_Name").
    Interestingly the error did occur in one of our SQL*Plus
    versions. Why we still are not sure, but since this was a silly
    error on my part, I'm sure a similarly silly reason will be the
    cause there two.
    I appreciate those who responded though. It is a great resource.
    Darren James
    I'm just guessing here, but could it be some sort of a size thing? Could it be that, if you don't break up line 2, somehow
    it gets truncated or wrapped at an inappropriate place? To test
    this theory, you might try putting the carriage return in front
    of the ORDER BY, instead of in front of the AND, and see if it
    has the same effect. If you do get it figured out, please
    satisfy our curiosity and let us know.

  • Invalid Column Name message in the subquery

    Hi All, I am receiving the invalid column name message in the subquery. Please help me if there is any work around or change in the query:
    Sample query:
    update table1 set table1.column1 =
    (Select column1 from
    (Select column1 from table2 where
    table1.columnX = table2.columnX
    order by table2.columnM desc,table2.ColumnN desc,
    where rownum =1)
    When i run the above query i am receiving the following error message:
    ORA-00904:invalid column name at table1.columnx.
    This column is already existing in table1 and looks like this table is not recoginzed inside of the subquery.
    I am trying to update table1.column1 using the first value from table2 after ordering by table2.columnM desc, table2.columnN desc. (ColumnM and ColumnN are the Date columns which i need to perform the sorting). I am new to sql/Plsql. Thanks in Advance for help....

    The problem is that you can not refer to columns from the outer table from inside a second subquery inside your subquery. Only one level of subquery can be used to transport the column name,.
    A solution can be to use groups and aggregation functions instead of rownum = 1.
    The following might work.
    untested
    update table1
    set table1.column1 =
      (Select max(column1) keep (dense_rank first over table2.columnM desc,table2.ColumnN desc)
       from table2
       where table1.columnX = table2.columnX
       ) Another way can be to to make a UNCORRELATED subquery first and then filter on that uncorrelated query with the column name from the outer statement.
    This time I use a analytic function.
    untested
    update table1 u
    set u.column1 = (select v1.column1
       from
         (Select t2.column1, t2.columnX, row_number over (partition by t2.column1, t2.columnX order by t2.columnM desc,t2.ColumnN desc) as rn
          from table2
          ) v1
       where v1.columnX = u.columnX
       and v1.rn = 1
    where /* where clause is missing! */

  • X.column.getStringVal() throws "invalid column name", works in SQL*Plus.

    The subject sums it up pretty well... I have a query that works fine from SQL*Plus, but throws a JDBC exception with "ORA-00904 invalid column name" if I create a PreparedStatement from it and call executeQuery().
    The query itself is substantially similar to:
    SELECT foo, t.bar.getStringVal() from some_table t
    where "Some table" is an oracle 9i table, "foo" is a varchar2 column, and "bar" is a column that used to be varchar2 before I dropped and re-created the table with an xmltype column instead. "t" is an alias for the table that I didn't used to need (since it's only one table), but apparently is required for getStringVal() to work.
    ... And, of course, .getStringVal() is being used as a convenient way to treat technically LOB-like xmltype columns as big ersatz varchar2 columns so I won't have to screw around with stream i/o just to read a 4,001-byte value into a String ;-)
    I'm using the ojdbc14.jar thin driver and a fairly recent j2sdk (1.4.1_02, I think). I made a point of anihilating every copy of classes12.zip on my PC just to make sure it wasn't lurking in a classpath somewhere to screw things up.
    Strangely enough, it DOES work from within Netbeans' database explorer (itself connecting to the same Oracle database using the ojdbc14.jar thin driver).
    For the sake of being comprehensive, here's an example of the actual JDBC code that won't work:
    public ResultSet doQuery(Connection conn, int val) throws SQLException {
    String sql = "SELECT foo, t.bar.getStringVal() from some_table t where anothercolumn = ?";
    PreparedStatement sth = conn.prepareStatement(sql);
    sth.setInt(1, val);
    ResultSet rs = sth.executeQuery();
    // everything past this point is moot,
    // because sth.executeQuery throws an exception...
    // however, the ResultSet would ultimately be
    // returned to the method's caller, and
    // its values read using getString(fieldname)
    // including 'bar', the xmltype field...

    OK, this particular problem was my fault. The original table was on a server running 8i. To spare myself the grief of having to deal with CLOBs on 8i's terms and take advantage of 9i's new conveniences for handling them, I created a new table on our other server that's running 9i and updated the app's config settings to reflect the new server. Unfortunately, I forgot that the debugging/testing main() method had the URL of the old database hardcoded (it was written before the rest of the class). Ergo... it was still looking at the old database. Oops. (*blush*).

  • Oracle Invalid Column Name Error in JSP

    I was wondering if anyone could provide some help. I am new to JSP, Beans and Oracle and I am getting a java.sql.SQLException: ORA-00904: invalid column name error when I run the JSP below. The Java Bean's code it is referencing is also included and this bean is just storing information from the server from a previous login page.
    Eventually I need to display more columns from the database using this JSP, but since I can even get this one working, I am at a loss!
    PLEASE HELP!!!!
    I have even tried to replace the beans reference in the sql with just a login and password I know exists in the database! Same error... Help!
    I am running Tomcat and Oracle 9i!
    <!--
    Assign-->
    <html>
    <head>
    <title>Student Signon on page</title>
    </head>
    <body bgcolor="#FDF5E6">
    <h1 align="center">>Student Signon on page</h1>
    <%@ page import="java.sql.*" %>
    <%@ page import="BeanAs2.Bean5b" %>
    <%
    String driverClassString = "oracle.jdbc.driver.OracleDriver";
    String driverConnectString;
    driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
    String user = "system";
    String passwd = "manager";
    %>
    <jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
    <jsp getProperty id = "Bean5b" property = "login" />
    <jsp getProperty id = "Bean5b" property = "pswd" />
    <%
    Connection connection = null;
    try {
    Class.forName(driverClassString);
    connection = DriverManager.getConnection(driverConnectString, user, passwd);
    catch (Exception e) {
    out.println("Cannot close connect to database!"+e);
    if (connection != null) {
    String login =Bean5b.getpassword();
    String pswd =Bean5b.getStudentlogin();
    String sql = "SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='login' AND studentinfo.password='pswd';";
    try { // execute the query
    //SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='s40079703' AND studentinfo.password='p4007swd'
    Statement stmt = connection.createStatement();
    ResultSet rst;
    rst = stmt.executeQuery(sql);
    // Fetch the query result, and dispaly them in a table
    while (rst.next()) {
    %>
    <tr>
    <td> <%= rst.getString("system.teaching.code") %> </td>
    </tr>
    <%
    stmt.close();
    connection.close();
    } catch(Exception e) {
         out.println("Cannot fetch data from database!"+e);
    %>
    </body></html>
    package BeanAs2;
    import java.util.*;
    public class Bean5b {
         // all variables must not be public in a bean
    private String Studentlogin;
    private String password;
    public String getStudentlogin() {
    return this.Studentlogin;
    public String getpassword() {
    return this.password;
         public void setStudentlogin(String login) {
              this.Studentlogin = login;
         public void setpassword(String pswd) {
              this.password = pswd;

    Hi
    Thanks for your reply, I should of looked at my code before I copied over. The field should of been "studentinfo.familyname" which I was calling, I have just been changing so much code in this to try and see what the problem is, I didnt fix this before I copied this over.... trust me, I have tried everything........ Hence when I correctly called the "concatination the login name and password to the query properly" as you pointed out, I got rid of the error, BUT now it returning NO DATA????? (the table is populated - I have checked this!!!!)
    The table I am trying to get information from sits under a schema called system. It has the following columns;
    STUDENTID NUMBER 8
    FAMILYNAME VARHCAR 60
    GIVENNAME VARCHAR 60
    USERNAME VARCHAR 9
    PASSWORD VHARCHAR 60
    The database is called globaldb. My computer is called Midas2
    Whats more, the query works in Oracle sql*plus!!! Returning the relevent data!!!
    Actually here is the code for the JSP, with all the changes and none of the mistakes of my previous post...........,
    Pleaes help!!!
    <html>
    <head>
    <title>Student Signon on page</title>
    </head>
    <body bgcolor="#FDF5E6">
    <h1 align="center">>Student Signon on page</h1>
    <%@ page import="java.sql.*" %>
    <%@ page import="BeanAs2.Bean5b" %>
    <%
    String driverClassString = "oracle.jdbc.driver.OracleDriver";
    String driverConnectString;
    driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
    String user = "system";
    String passwd = "manager";
    %>
    <jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
    <jsp getProperty id = "Bean5b" property = "login" />
    <jsp getProperty id = "Bean5b" property = "pswd" />
    <%
    Connection connection = null;
    try {
    Class.forName(driverClassString);
    connection = DriverManager.getConnection(driverConnectString, user, passwd);
    catch (Exception e) {
    out.println("Cannot close connect to database!"+e);
    if (connection != null) {
    String login =Bean5b.getpassword();
    String pswd =Bean5b.getStudentlogin();
    String sqlQuery;
    sqlQuery = ("SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='" + login + "' AND studentinfo.password='" + pswd + "'"); %>
    <% try { // execute the query
    Statement stmt = connection.createStatement();
    ResultSet rst;
    rst = stmt.executeQuery(sqlQuery);
    // Fetch the query result, and dispaly them in a table
    while (rst.next()) {
    %>
    <tr>
    <td> <%= rst.getString("studentinfo.familyname") %> </td>
    </tr>
    <%
    stmt.close();
    connection.close();
    } catch(Exception e) {
         out.println("Cannot fetch data from database!"+e);
    %>
    </body></html>

  • Invalid column name in WLS 6.1 sp4

    We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
    we migrated to sp4 and get a invalid column name exception while updating records.
    For select queries there is no error. The SQL generated by toplink is -
    UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
    , REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
    UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
    It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
    to fix it
    The exception stack trace is -
    2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
    - Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
    STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904
         at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
         at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    INTERNAL EXCEPTION STACK:
    java.sql.SQLException: ORA-00904: invalid column name
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
         at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
         at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
         at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
    sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904 - with nested exception:
    [EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904]
         at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    com.pws.framework.exception.GeneralException: There was an unexpected error. Please
    contact your system administrator.
         at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

    We have changed default thin driver to 920 from 817 in 610sp4. If you are using 817/901 dbserver, please put 817/901 classes12.zip in your
    classpath before weblogic.jar and you will be ok.
    Mitesh
    vivek wrote:
    We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
    we migrated to sp4 and get a invalid column name exception while updating records.
    For select queries there is no error. The SQL generated by toplink is -
    UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
    , REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
    UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
    It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
    to fix it
    The exception stack trace is -
    2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
    - Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
    STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904
    at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
    at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
    at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
    at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
    at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
    at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
    at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    INTERNAL EXCEPTION STACK:
    java.sql.SQLException: ORA-00904: invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
    at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
    at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
    at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
    at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
    at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
    at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
    at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
    at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
    sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904 - with nested exception:
    [EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904]
    at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    com.pws.framework.exception.GeneralException: There was an unexpected error. Please
    contact your system administrator.
    at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Maybe you are looking for

  • MPLS load balancing

    Hello, Graph of the network is in the attachment. I have problem that loadbalanicing among two GigabitEtehernet links in OSPF (between PE4 and P1 router on the picture)doesn't work. Black link goes to 1G/s and begins to drop packets and red one stays

  • Strange behaviour using XPath functions

    Hi guis, I have next simple code: DECLARE v_xmltype XMLTYPE; l_xml LONG := '<?xml version="1.0" encoding="UTF-8"?> <document xmlns="http://www.sepbulgaria.com/services/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/

  • Firefox + bittorrent

    ok, I did post something similar to this in another thread: firefox for me tends to hang on some odd stuff.  Specifically clicking on a .torrent link (which should open a OpenWith/SaveAs dialog box) hangs the entire thing, and I am required to kill a

  • Translation Route wizard Report

    Hello I am configuring UCCE components for Translation Route, After finishing my Translation Route wizard at the end when I click on finish, there was an error says ''Microsoft Visual C++ Runtime Library  Program: D:\icm\bin\trwizard.exe and I am not

  • Why does iOS not work with Blogger threaded discussions?

    This has been an ongoing problem since they appeared, if you do anything in a comment entry block on a Blogger based blog threaded reply it will silently crash. No more text entry, no moving cursor, no cut or paste functions.  You ask at Blogger supp