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

Similar Messages

  • 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

  • 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

  • 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

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

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

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

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

  • IR: ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier

    Hi everyone,
    has anyone else had this error which has been driving me round the bend during the last three days?
    I have an interactive report which used to work fine.
    Now it happens (when the page loads/a filter is en- or disabled) that - from time to time, but unpredictable - I receive
    ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier
    The report is based on a table function.
    I will try to set up a testcase and post the link here, but so far I haven't managed to force the error to occur.
    But maybe someone else has already bumped into this kind of error? I would be grateful for any hints!
    Best regards,
    Sabine
    Application Express 4.1.0.00.32
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    Hi Jari,
    I changed the type definition (the return type of the table function) and extended the select list in the source of the IR.
    I do not use 'select *' but reference every column explicitly. So APEX easked me whether to add the new column.
    I also tried deleting in recreating the region, but no luck.
    Any more ideas?
    Best regards,
    Sabine

  • Advanced Conditions causing ORA-00904 invalid identifier

    I have another weird thing going on...
    It may be the complexity of the data I'm pulling, but I'm going to simplify the problem first...
    I have several conditions in my workbook that I need to be true regardless then I need the following (this is a payroll thing):
    ((Total Regular Hours > 40 AND Total Overtime = 0) OR (Total Overtime > 0 AND (Total Regular Hours - Total Overtime Hours) <> 40))
    So, I'm using Discoverer Plus 10g and if I create separate conditions for Total Overtime > 0 and (Total Regular Hours - Total Overtime Hours) <> 40) it will work, but if I try to combine them into one condition (so I can then add my OR and the other 2 conditions) it gives me the "ORA-00904 invalid identifier" error and will not run.
    The only way I've been able to do it is to create 3 conditions and 2 worksheets. That way, I can add (Total Regular Hours > 40 AND Total Overtime = 0) in one condition and apply it to one sheet; then I the other 2 separate conditions can be applied to the other worksheet.
    I hate having to have 2 worksheets when I should be able to create an advanced condition... anyone have any ideas?
    Regards,
    Emily

    It is actually a typo in the message because I have a calculated column that calculates the difference... sorry.
    I did try the idea of running the SQL that was generated in SQL Developer and it doesn't look right.
    It did all my other conditions under the where, but then where I would have thought it should do another and it did a WHERE.... see below. (I only pasted from the from statement on to save room)
    FROM HRBG_PEOPLE_ASSIGNMENT o393615, APPS.PTEN_PAY_BEE_V o393616
    WHERE ( (o393616.ASSIGNMENT_ID = o393615.ASSIGNMENT_ID))
    AND (o393615.BG_SECURITY_FLAG_CODE = 'Y')
    AND (o393616.DATE_EARNED BETWEEN o393615.ASSIGNMENT_START_DATE AND o393615.ASSIGNMENT_END_DATE AND o393616.DATE_EARNED BETWEEN o393615.RECORD_START_DATE AND o393615.RECORD_END_DATE)
    AND (o393616.DATE_EARNED IN (:"Date Earned Dates"))
    AND (o393616.EFFECTIVE_DATE = :"Period End Date")))))
    WHERE ( ( NP100 ) > 40 AND ( NP101 ) = 0)
    AND ( ( NP104 ) <> 40 AND ( NP105 ) > 0)
    ORDER BY E393849 ASC ;
    Do you see the WHERE that I marked in BOLD? That should be an AND...
    I even tried creating one crazy long condition to include everything in one and still got the same error and it produced the same SQL. I am thinking it has to do with the fact that I'm actually showing group totals for Regular Hours and Overtime and then subtracting them to get the difference. It all breaks when I add that difference in with the others. If I keep it separate, it does fine.
    By the way, the error I get when running just the SQL is "not all variables bound"
    Thanks,
    Emily

  • Discoverer report :ORA -00904 Invalid Identifier

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

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

  • RMAN-06004:ORACLE error from recovery catalog ... ORA-00904: : invalid ...

    Good Morning All,
    One of our RMAN backups is failing with the following error message. Any suggestions would be greatly appreciated.
    ==================================================================================================
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Edited by: ORA_UMAIR on Dec 31, 2008 7:51 AM

    This Oracle Database is 9.2.0.6.0. Here is the complete log file. The RMAN script that I am using ran successfully many times before.
    ====================================================================================================
    Recovery Manager: Release 9.2.0.6.0 - 64bit Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    RMAN>
    connected to recovery catalog database
    RMAN>
    connected to target database: CUSTPR (DBID=525071053)
    RMAN>
    RMAN> #########################################################################
    2> # LEVEL 0 BACKUP #
    3> #########################################################################
    4>
    5> # Configure backups to be written to disk.
    6> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    old RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Set the retention policy to a recovery window of 7 days. This ensures that
    2> # RMAN retains all backups needed to recover the database to any point in time
    3> # in the last 7 days. You can use the DELETE OBSOLETE command to delete
    4> # backups that are no longer required by the retention policy. To exclude a
    5> # backup from consideration by the policy, you can use KEEP option with the
    6> # BACKUP command.
    7> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to use two disk channels for backup, restore, recovery, and
    2> # maintenance operations.
    3> CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    old RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write disk backups to the /backup directory.
    2> # The format specifier %t is replaced with a 4-byte timestamp, %s with the
    3> # backup set number, and %p with the backup piece number.
    4> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    old RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to back up the control file after each backup.
    2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write controlfile autobackups to the /backup directory.
    2> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Enable the backup optimization feature introduced in 9i to make sure that
    2> # RMAN won't backup an archivelog or datafile if there already exists a backup
    3> # of that file. The FORCE option can be used to override optimization on a
    4> # specific BACKUP command.
    5> CONFIGURE BACKUP OPTIMIZATION ON;
    old RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Use the SHOW ALL command to see the current configuration settings.
    2> SHOW ALL ;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%d_bkp_cf%F';
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 1;
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orahome2/custprdb/9.2.0/dbs/snapcf_custpr.f'; # default
    RMAN>
    RMAN> # The following commands are run each day to start the backup cycle.
    2> # The steps are:
    3> # - Take an incremental level 0 backup of the database. A level 0 backup is
    4> # a complete backup of the entire file which can be used as the basis
    5> # for a subsequent incremental backup.
    6> # - Backup all archivelogs that have not already been backed up.
    7> # - Delete on-disk archivelogs older than seven days.
    8>
    9> BACKUP INCREMENTAL LEVEL 0 FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p'
    10> DATABASE maxsetsize 33G
    11> PLUS ARCHIVELOG FORMAT '/backups/admin/custpr/%d_bkp_al%t_Set%s_Piece%p'
    12> delete all input;
    Starting backup at 12/30/2008 22:01:40
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=11 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=8008 recid=7910 stamp=674638862
    input archive log thread=1 sequence=8009 recid=7911 stamp=674671207
    input archive log thread=1 sequence=8010 recid=7912 stamp=674697380
    input archive log thread=1 sequence=8011 recid=7913 stamp=674780433
    input archive log thread=1 sequence=8012 recid=7914 stamp=674784211
    input archive log thread=1 sequence=8013 recid=7915 stamp=674863288
    input archive log thread=1 sequence=8014 recid=7916 stamp=674863300
    channel ORA_DISK_1: starting piece 1 at 12/30/2008 22:01:41
    channel ORA_DISK_1: finished piece 1 at 12/30/2008 22:03:47
    piece handle=/backups/admin/custpr/CUSTPR_bkp_al674863300_Set3083_Piece1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:02:07
    channel ORA_DISK_1: deleting archive log(s)
    archive log filename=/custpr/arch/arch_custpr_8008.log recid=7910 stamp=674638862
    archive log filename=/custpr/arch/arch_custpr_8009.log recid=7911 stamp=674671207
    archive log filename=/custpr/arch/arch_custpr_8010.log recid=7912 stamp=674697380
    archive log filename=/custpr/arch/arch_custpr_8011.log recid=7913 stamp=674780433
    archive log filename=/custpr/arch/arch_custpr_8012.log recid=7914 stamp=674784211
    archive log filename=/custpr/arch/arch_custpr_8013.log recid=7915 stamp=674863288
    archive log filename=/custpr/arch/arch_custpr_8014.log recid=7916 stamp=674863300
    Finished backup at 12/30/2008 22:03:47
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Recovery Manager complete.

  • ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"

    Hi,
    Oracle version :
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    Funny issue,
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT ta.as
                          FROM   tac ta
                          WHERE  ta.acn         = '145'
                          AND    ta.ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );When i try to run this , get
    Error report:
    SQL Error: ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"
    38101. 00000 - "Invalid column in the INSERT VALUES Clause: %s"
    *Cause:    INSERT VALUES clause refers to the destination table columns
    *Action:
    Now, when I try n remove the alias name from the insert clause, i.e.
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT as
                          FROM   tac
                          WHERE  acn         = '145'  -------- remove alias from here i.e. 'ta'
                          AND   ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );The above statement fine.
    Edited by: user8650395 on Mar 12, 2010 6:10 AM
    Edited by: user8650395 on Mar 12, 2010 6:19 AM

    Hi,
    Nice formatting!
    The first value in the INSERT clause looks suspicious:
    MERGE INTO tfc         cb1
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,     ...If tfc is a table name, then it can't be a sequnece name.
    Perhaps you meant something like
    ...            VALUES
                        (tfc_id_seq.NEXTVAL,     ...I hope that solves the problem.
    If not, post a little sample data (CREATE TABLE and INSERT statements) for the tables as they exist before the MERGE.
    Edited by: Frank Kulash on Mar 12, 2010 9:34 AM

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

Maybe you are looking for

  • I didnt get an os disc with my new iMac

    why didnt I get an od disc

  • TWO GL ACCOUNTS IN VKOA

    Dear All Could some able tell me about the integration of SD-FI             1.  Why two GL accounts are asked in VKOA             2.  What is the purpose of Account Keys like ERL, ERS             3.  What is difference between Account determination a

  • URGENT: I can't attach pdf or word docs in outlook/hotmail. I cleared everything in my recent history, is that the problem? How to solve it??

    I went to firefox>history>clear recent history> time range clear:everything and I clicked all the boxes..I realize I should have clicked only cache box....how can i go back?

  • Table help

    Hay people, I'm quite new to this. I was wondering if there was anyway if getting a "Cell" in a table, to read information from another HTML file. So when i update that HTML file, it updates all the pages on my site. Any information would be well app

  • Wants me to sign in, I already have

    I have opened Adobe Download Assistant and am logged in as it says up the top right "Welcome, xxxxx" However at the bottom I am trying to download Premiere CS6 and it says below the download bar "Please sign in with you Adobe ID to continue." Am I no