Error- invalid identifier

create or replace Procedure update_dynamic_pro (tab1 varchar2,src_col1 varchar2,tar_col1 varchar2,tab2 varchar2,src_col2 varchar2,tar_col2 varchar2)
is
v_sql varchar2(9000);
cursor c1(p_variable1 varchar2) is select distinct(p_variable1) from ACD_BAL_400010_DUMMY;
begin
for i in c1(src_col1)
LOOP
v_sql := 'update ' || tab1 || ' set ' || tar_col1 || ' = (select distinct(' || tar_col2 || ') from ' || tab2 || ' where ' || src_col2 || ' =i)where '||src_col1 || ' = i';
EXECUTE IMMEDIATE v_sql;----------------------ORA-00904: "I": invalid identifier
EXIT WHEN c1%NOTFOUND;
end loop;
end;
Can you'll please tell me a solution for this error "ORA-00904: "I": invalid identifier" in line number 10

1008654 wrote:
create or replace Procedure update_dynamic_pro (tab1 varchar2,src_col1 varchar2,tar_col1 varchar2,tab2 varchar2,src_col2 varchar2,tar_col2 varchar2)
is
v_sql varchar2(9000);
cursor c1(p_variable1 varchar2) is select distinct(p_variable1) from ACD_BAL_400010_DUMMY;
begin
for i in c1(src_col1)
LOOP
v_sql := 'update ' || tab1 || ' set ' || tar_col1 || ' = (select distinct(' || tar_col2 || ') from ' || tab2 || ' where ' || src_col2 || ' =i)where '||src_col1 || ' = i';
EXECUTE IMMEDIATE v_sql;----------------------ORA-00904: "I": invalid identifier
EXIT WHEN c1%NOTFOUND;
end loop;
end;
Can you'll please tell me a solution for this error "ORA-00904: "I": invalid identifier" in line number 10Why the dynamic SQL?
Not to be mean here, but since you don't seem to know how to debug your procedure and find out why it's not compiling, I'm going to assume you're relatively new to the Oracle world. Are you aware of the ramifications of abusing dynamic SQL like this?
Cheers,

Similar Messages

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

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

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

  • I am getting "Invalid Identifier" while running the below query

    Iam getting the error "Invalid Identifier, c_rank" while running the below query. Please help.
    select a.*, b.pog_description pog_description, b.start_date,
    row_number() over(partition by b.pog_description order by b.start_date) c_rank
    from temp_codi_dept_35 a, pog_master_msi b, pog_skus_msi c
    where a.sku = c.pog_sku
    and b.pog_id = c.pog_id
    and b.pog_dept = c.pog_dept
    and b.pog_number = c.pog_number
    and b.pog_level = c.pog_level
    and a.sku = 10263477
    and c_rank = 1;

    >
    Iam getting the error "Invalid Identifier, c_rank" while running the below query. Please help.
    select a.*, b.pog_description pog_description, b.start_date,
    row_number() over(partition by b.pog_description order by b.start_date) c_rank
    from temp_codi_dept_35 a, pog_master_msi b, pog_skus_msi c
    where a.sku = c.pog_sku
    and b.pog_id = c.pog_id
    and b.pog_dept = c.pog_dept
    and b.pog_number = c.pog_number
    and b.pog_level = c.pog_level
    and a.sku = 10263477
    and c_rank = 1;
    >
    You can't use 'c_rank' in the where clause because it doesn't exist; you are computing it in the SELECT clause.
    Remove the last condition and wrap your query in another one to select by 'c_rank'.

  • Report parameters being passed in URL - invalid identifier error

    Hi
    Id anyone aware of any format in which we should be passing values in the url to the report deployed on the server?
    A parameter that takes in the format 'e123','e234' - example for emp_id parameter.
    If we pass in this form, even a single value as 'e123' in the url to run the report -
    The value e123 is taken in single quotes and it displays the error
    REP-300: "e123": invalid identifier
    That is, it displays the error as if the string was entered in double quotes.

    Hi, Aaron.
    I tried what you said, and my code wouldn't parse correctly. Let me show you the whole module of PL/SQL that I'm dealing with here. I did not write this. This is something I'm maintaining and updating. The part that chokes is near the bottom.
    declare
    l_sql varchar2(4000) := 'select user_name,total from (select user_name,count(*) total from eba_ver2_cust_activity ' ;
    begin
    if :P23_START_DATE is not null and :P23_END_DATE is not null then
    l_sql := l_sql || ' where ACTIVITY_DATE between ''' || to_char(to_date(:P23_START_DATE,'dd-mon-yyyy'),'dd-mon-yyyy')
    || ''' and ' || '''' || to_char(to_date(:P23_END_DATE,'dd-mon-yyyy') ,'dd-mon-yyyy') || '''' ;
    elsif :P23_START_DATE is not null then
    l_sql := l_sql || ' where ACTIVITY_DATE >= ''' || to_char(to_date(:P23_START_DATE,'dd-mon-yyyy'),'dd-mon-yyyy') ||
    elsif :P23_END_DATE is not null then
    l_sql := l_sql || ' where ACTIVITY_DATE <= ''' || to_char(to_date(:P23_END_DATE,'dd-mon-yyyy'),'dd-mon-yyyy') || ''''
    end if;
    if :P23_ACTIVITY_TYPE != '%null%' and :P23_ACTIVITY_TYPE is not null then
    if :P23_START_DATE is not null or :P23_END_DATE is not null then
    l_sql := l_sql || ' and activity_type_id = ' || :P23_ACTIVITY_TYPE ;
    else
    l_sql := l_sql || ' where activity_type_id = ' || :P23_ACTIVITY_TYPE ;
    end if;
    end if;
    l_sql := l_sql || ' group by user_name )' ;
    return l_sql ;
    end ;
    I appreciate all the help. As for the job market for Apex programmers around here, I wouldn't know. I was a COBOL programmer for many years. I'm approaching retirement, and this will probably be my last IT job.
    Steve "the n00b" in Raleigh NC

  • Error ORA-00904  invalid identifier

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

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

  • Dynamic SQL Issue ORA-00904:invalid identifier error

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

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

  • ORA-00904 invalid identifier error

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

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

  • Dynamic SQL Error -ORA-00904: invalid identifier

    Hello!
    I'm really hoping I can get some fast help on this. In the interest of honesty, this is for a university oracle programming assignment. I've searched everywhere I can for the answer and haven't had any luck.
    Anyway, the problem in a nutshell. I have to write a package to write a text file. The formatting information for the file is held in a table, which has columns to define the various characteristics like justification, padding character and field value.
    RECORDTYPE FIELDNAME FIELDVALUE FIELDSIZE FIELDORDER PADDINGCHAR JUSTIFICATION DATASOURCE
    7 CreditTotal v_credit 10 5 '0' LPAD PROGRAM
    7 RecordType '7' 1 1 ' ' RPAD HARDCODE
    I can build the whole file except this footer. the FieldValue "v_credit" references a variable that has the calculated total of the credit amounts for the file. There are also "v_debit", and "(v_credit-v_debt)" entries.
    My question seems simple... How can I use this VARCHAR2 value from the table, and have it reference the variable within a Dynamic SQL string? If I use the textvalue of the column in the SQL string it gives me the invalid identifier error when it hits the EXECUTE IMMEDIATE statement. There is another row for the header which has "to_char(sysdate,'DDMMYYYY')" in it, and that runs fine. I'm assuming because they are native SQL statements and variables.
    I have tried encapsulating the v_credit in "s, and using dynamica bind variables but had the same problem passing the names to the USING clause.
    The SQL string created by the procedure is: SELECT LPAD(v_credit,10,'0' ) FROM dual
    The full error is:
    ORA-00904: "V_CREDIT": invalid identifier
    ORA-06512: at "BWOOD.PKG_BRIAN", line 108
    ORA-06512: at line 2
    Line 108 is the EXECUTE IMMEDIATE statement
    I would really appreciate someones help! I'm happy to post the procedure I've written, with the caveat that it's sloppy student work and needs cleaning up of all the experimental commented attempts:)
    Edited by: user5426606 on 20-May-2009 03:34 - Added a few more facts.

    Thank you for the fast replies. I'll post a short chunk of code to demonstrate.
    The actual procedure is quite a bit longer, but this should give you the idea.
    PROCEDURE build_dbfile (p_settlement_date IN DATE, p_settlement_key IN VARCHAR2, p_type IN VARCHAR2) AS
    v_sqlString    VARCHAR2(4000) := 'SELECT ';
    v_rectype     NUMBER := 7;
    v_line           LONG;
    v_debit        NUMBER := 0;
    v_credit       NUMBER := 0;
    v_nrRecords    NUMBER := 0;
      CURSOR c_settlement IS... -- to select records for data rows
    -- cursor to select the rows with the file formatting and data info
      CURSOR c_header IS   SELECT   NVL(fieldvalue,fieldname) db_field, <---- selects the data column
                                                   fieldsize,
                                                   NVL(paddingchar, ''' ''') paddingchar,
                                                   NVL(justification,'LPAD') justification,
                                                  datasource
                                      FROM     FSS_DESKBANK_REF
                                      WHERE    recordtype = r_rec_types.recordtype
                                      ORDER BY recordType, fieldorder;
    -- SELECT to get the SUM of datarows for v_credit
      SELECT      SUM(transactionamount)
      INTO      v_credit...
    -- SELECT to get the SUM of datarows for v_debit
      SELECT      SUM(transactionamount)
      INTO      v_debit....
    FOR r_head IN c_header LOOP
    v_sqlString := v_sqlString  || r_head.justification|| '('
                                         || r_head.db_field ||','
                                         || r_head.fieldsize || ','
                                         || r_head.paddingchar || ')';
    v_sqlString := v_sqlString || ' FROM ' || v_tbl_name;
    DBMS_OUTPUT.PUT_LINE('SQL --> '||v_sqlString);
    EXECUTE IMMEDIATE v_sqlString INTO v_line;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE(v_line);
    END build_dbfile;So the loop goes through the table rows, grabs each data value and formatting column, and builds the sql string, which is then passed to the execute statement. The issue is the ones where the datarow contains a reference to v_credit, and the error is generated. ie r_head.db_field contains the string "v_credit"
    Satish, the sql does look like that in the string, but the string is built from the table, not hardcoded. ie v_sqlString = "SELECT LPAD(v_credit,10,'0' ) FROM dual" when it is passed to the EXECUTE IMMEDIATE.
    Edited by: user5426606 on 20-May-2009 05:19

  • 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

  • Composer error: ORA-00904: "L"."CLID$$OWN": invalid identifier

    Does anybody know how to detect & solve this issue?
    I've read about thie Bug No 7372334 and checked the CLG$ tables and all them have the CLID$$OWN column.
    Any clue?
    Details from webtogo:
    MGP History User (Cycle ID: 23021 User: MVERNASCHIA)
         Page Refreshed          Jun 30, 2009 2:36:20 PM
    Summary
         Apply Pub Item Count          5
         Apply Record Count          0
         Has Apply Conflicts          NO
         Has Apply Errors          NO
         Apply Duration (seconds)          0
         Compose Pub Item Count          65
         Compose Record Count          101
         Has Compose Errors          YES
         Compose Duration (seconds)          2.328
    Details
    Applied Record     Counts:
    Insert Count     = 0
    Update Count     = 0
    Delete Count     = 0
    Applied PubItems:
    RASTRO
    IR_LOG_ERROR
    UM
    IR_CONFIG
    IR_SEQUENCIA
    Composed PubItems
    (<PubItem Name>, <Duration     in Milli Seconds>):
    TAB_PRECOS_VIG,16
    BONIF_TIPOS,16
    BIOS_VIEW_DET,15
    PROF,16
    MAQ_EFIC,0
    LOG_TAB_DADOS,31
    OPERAGR_REC,31
    BIOS_TREE_COD,16
    OS_MAQ_TAL,47
    HISTORIA,47
    DD_PLANTA,0
    ATIV_RECOMPILA,0
    TROVEL,15
    ESTIMA,32
    ALIM_MIGRA,15
    TALHAO_UNID,31
    CONF_ATABPRECO,16
    RECURSOS_DISP,0
    OS_PLANTIO_DET,31
    USINAS,16
    PLANTIO_TRANSP,16
    RI_RIEGO_RESUMEN,15
    REPORTE_FILTXT,0
    OPERAGR,16
    H_FROFRE,31
    DD_IDI,16
    CONFIG_PROCESSO,15
    DD_USR_SIA,0
    OPERAGR_TP_OS,47
    OS_CJOP_OP,47
    BIOS_REL_LOG,62
    DATA_ABAST,32
    A_PAGAR_PRG,15
    ALIM_PR_COMED,63
    PROD_ALMOXAGR,15
    OSREQ,16
    EVENTO_DATA,16
    SETOR,15
    LOG_TALHAO,47
    BIOS_TREE_REL,31
    TAL_SEQ_PLANEJ,16
    OPROD_DISP,16
    OPER_COMIS,15
    CUL_CURVA_PROD,16
    DD_VERSAO,16
    PLUVIO_TAL,31
    CUSTO_ESTADO,15
    VIVE_LOTES,63
    TAL_VERSION,0
    CD_PLA_TAL,16
    H_FRENTE_S,15
    OS_APLPROD,31
    CUSINFO,16
    LOTE,31
    CA_ANALISIS_TAL,141
    OS_APLPROD_DET,141
    OS_MAQ_RESUMO,140
    OS_TAL,110
    LAB_PROG_REC,0
    OPERAGR_CULT,31
    PLANTA_CULT,31
    OPERAGR_TAL,16
    COMIS_PRG,15
    REL_AGEND_REAL,16
    OS_ESTADO,16
    Compose Error:
    java.sql.SQLException: ORA-00904: "L"."CLID$$OWN": invalid identifier
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
         at oracle.lite.sync.Subscription.execPrepUpdate(Unknown Source)
         at oracle.lite.sync.Subscription.bindPstmGetResult(Unknown Source)
         at oracle.lite.sync.MyCompose.doCompose(Unknown Source)
         at oracle.lite.sync.SharedCompose.doCompose(Unknown Source)
         at oracle.lite.sync.MyCompose.doCompose(Unknown Source)
         at oracle.lite.sync.Consolidator$O8Server.fastPush(Unknown Source)
         at oracle.lite.sync.MGP$MGPG.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:595)

    Hi,
    Thanks Jo23 for the information, but I checked the SDK version and it is correct.
    You said the name of the column is CLID$$CS but the error occurs on the CLID$$OWN column and this column exists on the tables.
    Following is the command that fails as a sample:
    UPDATE MOBILEADMIN."CMP$VW_TAL_HIST" m
    SET DMLTYPE$$ = 'I', SEQNO$$ = 4104675, DTYPE$$ = NULL, RID$$ = NULL
    WHERE CLID$$CS = ?
    AND EXISTS
    (SELECT 'A'
    FROM (SELECT DISTINCT NNAPRD.VW_TAL_HIST."SAFRA",
    VW_TAL_HIST."LOTE",
    VW_TAL_HIST."SETOR",
    VW_TAL_HIST."FAZ",
    VW_TAL_HIST."TAL",
    VW_TAL_HIST."BLOCO",
    VW_TAL_HIST."CB",
    VW_TAL_HIST."DISTANCIA",
    VW_TAL_HIST."AREA_A",
    VW_TAL_HIST."AREA_P",
    VW_TAL_HIST."AREA_MEC",
    VW_TAL_HIST."AREA_MAN",
    VW_TAL_HIST."AREA_INUTIL",
    VW_TAL_HIST."AREA_CARREADOR",
    VW_TAL_HIST."AREA_COL",
    VW_TAL_HIST."KM_ASFALTO",
    VW_TAL_HIST."KM_ESTRADA",
    VW_TAL_HIST."KM_CARREADOR",
    VW_TAL_HIST."PRIMCORTE",
    VW_TAL_HIST."DATA_PLANTIO",
    VW_TAL_HIST."DATA_PRECOL",
    VW_TAL_HIST."TCC_EST",
    VW_TAL_HIST."PCC_EST",
    VW_TAL_HIST."AR_EST",
    VW_TAL_HIST."BRIX_EST",
    VW_TAL_HIST."FIBRA_EST",
    VW_TAL_HIST."COLHIDO",
    VW_TAL_HIST."DATA_ULTCOL",
    VW_TAL_HIST."DATA_ANOA",
    VW_TAL_HIST."SEM_ULTCOL",
    VW_TAL_HIST."TCC_ULTC",
    VW_TAL_HIST."PCC_ULTC",
    VW_TAL_HIST."AR_ULTC",
    VW_TAL_HIST."BRIX_ULTC",
    VW_TAL_HIST."FIBRA_ULTC",
    VW_TAL_HIST."MATURADOR",
    VW_TAL_HIST."CODMAT",
    VW_TAL_HIST."DATAMAT",
    VW_TAL_HIST."VINHACA",
    VW_TAL_HIST."TIPO_COL",
    VW_TAL_HIST."VARIEDADE",
    VW_TAL_HIST."ESTAGIO",
    VW_TAL_HIST."NCORTES",
    VW_TAL_HIST."SOLO",
    VW_TAL_HIST."FERTILIDADE",
    VW_TAL_HIST."TEXTURA",
    VW_TAL_HIST."TOPOGRAFIA",
    VW_TAL_HIST."PROPRIEDADE",
    VW_TAL_HIST."CULTURA",
    VW_TAL_HIST."ENTRA",
    VW_TAL_HIST."FILTRA",
    VW_TAL_HIST."ALTITUDE",
    VW_TAL_HIST."LATITUDE",
    VW_TAL_HIST."LONGITUDE",
    VW_TAL_HIST."SEM_PROGCOL",
    VW_TAL_HIST."PCC_PROGCOL",
    VW_TAL_HIST."YAFUE",
    VW_TAL_HIST."PERIODO",
    VW_TAL_HIST."UMI_EST",
    VW_TAL_HIST."UMI_ULTC",
    VW_TAL_HIST."REFORMA",
    VW_TAL_HIST."REFORMAF",
    VW_TAL_HIST."ESPACO_L",
    VW_TAL_HIST."DECLIVIDADE",
    VW_TAL_HIST."AREA_MUDA",
    VW_TAL_HIST."TON_MUDA",
    VW_TAL_HIST."MUNICIPIO",
    VW_TAL_HIST."MES_PCOL",
    VW_TAL_HIST."FXTCH",
    VW_TAL_HIST."FXDIST",
    VW_TAL_HIST."FXPCC",
    VW_TAL_HIST."FXAGUA",
    VW_TAL_HIST."PBS",
    VW_TAL_HIST."PBU",
    VW_TAL_HIST."LREF",
    VW_TAL_HIST."LSAC",
    VW_TAL_HIST."HQ",
    VW_TAL_HIST."FECHADA",
    VW_TAL_HIST."MAGICO",
    VW_TAL_HIST."DIFACESSO",
    VW_TAL_HIST."LSP",
    VW_TAL_HIST."DENS",
    VW_TAL_HIST."INFILTRA",
    VW_TAL_HIST."LIP",
    VW_TAL_HIST."CAPSULA",
    VW_TAL_HIST."PLANO",
    VW_TAL_HIST."EST_FIS",
    VW_TAL_HIST."FAIXA",
    VW_TAL_HIST."F_ADUBO",
    VW_TAL_HIST."F_PRAGA",
    VW_TAL_HIST."F_ERVA",
    VW_TAL_HIST."F_DOENCA",
    VW_TAL_HIST."ULTOPER",
    VW_TAL_HIST."DATAOPER",
    VW_TAL_HIST."STATUS_FOR",
    VW_TAL_HIST."RI_UDREC",
    VW_TAL_HIST."RI_UDREA",
    VW_TAL_HIST."PREVCOR",
    VW_TAL_HIST."M3AGUA",
    VW_TAL_HIST."ACOL",
    VW_TAL_HIST."GUIA",
    VW_TAL_HIST."SUBBLOQUE",
    VW_TAL_HIST."PH_EST",
    VW_TAL_HIST."PUR_EST",
    VW_TAL_HIST."AREA_CULT",
    VW_TAL_HIST."TCC_INICIO",
    VW_TAL_HIST."DATAREF",
    VW_TAL_HIST."ATR_EST",
    VW_TAL_HIST."ATR_ULTC",
    VW_TAL_HIST."TCC_EST_BRUTO",
    VW_TAL_HIST."TCC_ULTC_BRUTO",
    VW_TAL_HIST."QUEMA_POBLA",
    VW_TAL_HIST."QUEMA_CARRE",
    VW_TAL_HIST."QUEMA_LELEC",
    VW_TAL_HIST."QUEMA_AEROP",
    VW_TAL_HIST."QUEMA_ORGAN",
    VW_TAL_HIST."QUEMA_MONUM",
    VW_TAL_HIST."QUEMA_EDIFI",
    VW_TAL_HIST."AQUEMA_POBLA",
    VW_TAL_HIST."AQUEMA_CARRE",
    VW_TAL_HIST."AQUEMA_LELEC",
    VW_TAL_HIST."AQUEMA_AEROP",
    VW_TAL_HIST."AQUEMA_ORGAN",
    VW_TAL_HIST."AQUEMA_MONUM",
    VW_TAL_HIST."AQUEMA_EDIFI",
    VW_TAL_HIST."QUEMA_DIRVENTO",
    VW_TAL_HIST."DATA_ACOL",
    VW_TAL_HIST."DOSEMAT",
    VW_TAL_HIST."APLICA_MAT",
    VW_TAL_HIST."EDAD_ULTCOL",
    VW_TAL_HIST."TON_MOL",
    VW_TAL_HIST."DESTINO",
    VW_TAL_HIST."ULTIMA_LAB",
    VW_TAL_HIST."ULTIMA_LAB_DATA",
    VW_TAL_HIST."DATA_START",
    VW_TAL_HIST."TON_EST",
    VW_TAL_HIST."TON_EST_INI",
    VW_TAL_HIST."VISITA_ULT",
    VW_TAL_HIST."VISITA_DIAS",
    VW_TAL_HIST."VISITA_RESP",
    VW_TAL_HIST."AREA_MUDAREAL",
    VW_TAL_HIST."AMB_PRODUCAO",
    VW_TAL_HIST."FXPRECIP",
    VW_TAL_HIST."FXINSOL",
    VW_TAL_HIST."FXEVAP",
    VW_TAL_HIST."COLHIDO_TEMP",
    VW_TAL_HIST."AREA_COL_TEMP",
    VW_TAL_HIST."VISITA_TAB",
    VW_TAL_HIST."TESTEMUNHA",
    VW_TAL_HIST."TON_MOL_BRUTO",
    VW_TAL_HIST."CICLO",
    VW_TAL_HIST."MOTIVO",
    VW_TAL_HIST."ANA1",
    VW_TAL_HIST."ANA2",
    VW_TAL_HIST."ANA3",
    VW_TAL_HIST."ANA4",
    VW_TAL_HIST."ANA5",
    VW_TAL_HIST."ANA6",
    VW_TAL_HIST."ANA7",
    VW_TAL_HIST."ANA8",
    VW_TAL_HIST."ANA9",
    VW_TAL_HIST."ANA10",
    VW_TAL_HIST."ANA11",
    VW_TAL_HIST."ANA12",
    VW_TAL_HIST."ANA13",
    VW_TAL_HIST."ANA14",
    VW_TAL_HIST."ANA15",
    VW_TAL_HIST."ANA16",
    VW_TAL_HIST."ANA17",
    VW_TAL_HIST."ANA18",
    VW_TAL_HIST."ANA19",
    VW_TAL_HIST."ANA20",
    VW_TAL_HIST."ANA21",
    VW_TAL_HIST."ANA22",
    VW_TAL_HIST."ANA23",
    VW_TAL_HIST."ANA24",
    VW_TAL_HIST."ANA25",
    VW_TAL_HIST."ANA26",
    VW_TAL_HIST."ANA27",
    VW_TAL_HIST."ANA28",
    VW_TAL_HIST."ANA29",
    VW_TAL_HIST."ANA30",
    VW_TAL_HIST."ANA31",
    VW_TAL_HIST."ANA32",
    VW_TAL_HIST."ANA33",
    VW_TAL_HIST."ANA34",
    VW_TAL_HIST."ANA35",
    VW_TAL_HIST."ANA36",
    VW_TAL_HIST."ANA37",
    VW_TAL_HIST."ANA38",
    VW_TAL_HIST."ANA39",
    VW_TAL_HIST."ANA40",
    VW_TAL_HIST."ANA41",
    VW_TAL_HIST."ANA42",
    VW_TAL_HIST."ANA43",
    VW_TAL_HIST."ANA44",
    VW_TAL_HIST."ANA45",
    VW_TAL_HIST."ANA46",
    VW_TAL_HIST."ANA47",
    VW_TAL_HIST."ANA48",
    VW_TAL_HIST."ANA49",
    VW_TAL_HIST."ANA50",
    VW_TAL_HIST."ANA51",
    VW_TAL_HIST."ANA52",
    VW_TAL_HIST."ANA53",
    VW_TAL_HIST."ANA54",
    VW_TAL_HIST."ANA55",
    VW_TAL_HIST."ANA56",
    VW_TAL_HIST."ANA57",
    VW_TAL_HIST."ANA58",
    VW_TAL_HIST."ANA59",
    VW_TAL_HIST."ANA60",
    VW_TAL_HIST."ANA61",
    VW_TAL_HIST."ANA62",
    VW_TAL_HIST."ANA63",
    VW_TAL_HIST."ANA64",
    VW_TAL_HIST."ANA65",
    VW_TAL_HIST."ANA66",
    VW_TAL_HIST."ANA67",
    VW_TAL_HIST."ANA68",
    VW_TAL_HIST."ANA69",
    VW_TAL_HIST."ANA70",
    VW_TAL_HIST."ANA71",
    VW_TAL_HIST."ANA72",
    VW_TAL_HIST."ANA73",
    VW_TAL_HIST."ANA74",
    VW_TAL_HIST."ANA75",
    VW_TAL_HIST."AREA_EX",
    VW_TAL_HIST."ALTURA",
    VW_TAL_HIST."NOME",
    VW_TAL_HIST."COD_UNICO",
    VW_TAL_HIST."FASE_FENOL",
    VW_TAL_HIST."NR_VALVULAS",
    VW_TAL_HIST."NR_RUAS",
    VW_TAL_HIST."ANA1_EST",
    VW_TAL_HIST."ANA2_EST",
    VW_TAL_HIST."ANA3_EST",
    VW_TAL_HIST."ANA4_EST",
    VW_TAL_HIST."ANA5_EST",
    VW_TAL_HIST."ANA6_EST",
    VW_TAL_HIST."ANA7_EST",
    VW_TAL_HIST."ANA8_EST",
    VW_TAL_HIST."ANA9_EST",
    VW_TAL_HIST."ANA10_EST",
    VW_TAL_HIST."ANA11_EST",
    VW_TAL_HIST."ANA12_EST",
    VW_TAL_HIST."ANA13_EST",
    VW_TAL_HIST."ANA14_EST",
    VW_TAL_HIST."ANA15_EST",
    VW_TAL_HIST."ANA16_EST",
    VW_TAL_HIST."ANA17_EST",
    VW_TAL_HIST."ANA18_EST",
    VW_TAL_HIST."ANA19_EST",
    VW_TAL_HIST."ANA20_EST",
    VW_TAL_HIST."ANA21_EST",
    VW_TAL_HIST."ANA22_EST",
    VW_TAL_HIST."ANA23_EST",
    VW_TAL_HIST."ANA24_EST",
    VW_TAL_HIST."ANA25_EST",
    VW_TAL_HIST."ANA26_EST",
    VW_TAL_HIST."ANA27_EST",
    VW_TAL_HIST."ANA28_EST",
    VW_TAL_HIST."ANA29_EST",
    VW_TAL_HIST."ANA30_EST",
    VW_TAL_HIST."ANA31_EST",
    VW_TAL_HIST."ANA32_EST",
    VW_TAL_HIST."ANA33_EST",
    VW_TAL_HIST."ANA34_EST",
    VW_TAL_HIST."ANA35_EST",
    VW_TAL_HIST."ANA36_EST",
    VW_TAL_HIST."ANA37_EST",
    VW_TAL_HIST."ANA38_EST",
    VW_TAL_HIST."ANA39_EST",
    VW_TAL_HIST."ANA40_EST",
    VW_TAL_HIST."ANA41_EST",
    VW_TAL_HIST."ANA42_EST",
    VW_TAL_HIST."ANA43_EST",
    VW_TAL_HIST."ANA44_EST",
    VW_TAL_HIST."ANA45_EST",
    VW_TAL_HIST."ANA46_EST",
    VW_TAL_HIST."ANA47_EST",
    VW_TAL_HIST."ANA48_EST",
    VW_TAL_HIST."ANA49_EST",
    VW_TAL_HIST."ANA50_EST",
    VW_TAL_HIST."ANA51_EST",
    VW_TAL_HIST."ANA52_EST",
    VW_TAL_HIST."ANA53_EST",
    VW_TAL_HIST."ANA54_EST",
    VW_TAL_HIST."ANA55_EST",
    VW_TAL_HIST."ANA56_EST",
    VW_TAL_HIST."ANA57_EST",
    VW_TAL_HIST."ANA58_EST",
    VW_TAL_HIST."ANA59_EST",
    VW_TAL_HIST."ANA60_EST",
    VW_TAL_HIST."ANA61_EST",
    VW_TAL_HIST."ANA62_EST",
    VW_TAL_HIST."ANA63_EST",
    VW_TAL_HIST."ANA64_EST",
    VW_TAL_HIST."ANA65_EST",
    VW_TAL_HIST."ANA66_EST",
    VW_TAL_HIST."ANA67_EST",
    VW_TAL_HIST."ANA68_EST",
    VW_TAL_HIST."ANA69_EST",
    VW_TAL_HIST."ANA70_EST",
    VW_TAL_HIST."ANA71_EST",
    VW_TAL_HIST."ANA72_EST",
    VW_TAL_HIST."ANA73_EST",
    VW_TAL_HIST."ANA74_EST",
    VW_TAL_HIST."ANA75_EST",
    VW_TAL_HIST."DATA_AGOSTE",
    VW_TAL_HIST."PLUVIO",
    VW_TAL_HIST."EVAPOR",
    VW_TAL_HIST."DATA_URIEGO",
    VW_TAL_HIST."PERC_RIEGO",
    VW_TAL_HIST."RIE_HACER",
    VW_TAL_HIST."RIE_EDAD_MIN",
    VW_TAL_HIST."RIE_EDAD_MAX",
    VW_TAL_HIST."RIE_INI",
    VW_TAL_HIST."RIE_FIN",
    VW_TAL_HIST."RIE_LAS",
    VW_TAL_HIST."RIE_DATA_LAS",
    VW_TAL_HIST."NR_MAXPLRUAS",
    VW_TAL_HIST."MESC_PROGCOL",
    VW_TAL_HIST."EDAD_PROGCOL",
    VW_TAL_HIST."RALEIO",
    VW_TAL_HIST."TPPLANTIO",
    VW_TAL_HIST."EXCEL_LINHA",
    VW_TAL_HIST."EXCEL_COLUNA",
    VW_TAL_HIST."OTM_MESC_PROGCOL",
    VW_TAL_HIST."OTM_EDAD_PROGCOL",
    VW_TAL_HIST."OTM_DATA_PROGCOL",
    VW_TAL_HIST."ULTIMA_LAB_OS",
    VW_TAL_HIST."KG_FRUTO_PLANTA",
    VW_TAL_HIST."AREA_COL_ULTC",
    VW_TAL_HIST."DATA_ENC",
    VW_TAL_HIST."ULTIMA_CJ_LAB",
    VW_TAL_HIST."CLASSIF_PRECOL",
    VW_TAL_HIST."NOTA_PRECOL",
    VW_TAL_HIST."EDMIN",
    VW_TAL_HIST."EDMAX",
    VW_TAL_HIST."FCMIN",
    VW_TAL_HIST."FCMAX",
    VW_TAL_HIST."TCHM_EST",
    VW_TAL_HIST."TON_PROXIMA_COS",
    VW_TAL_HIST."EDAD_PROXIMA_COS",
    VW_TAL_HIST."TON_REFUGO",
    VW_TAL_HIST."PUR_ULTC",
    VW_TAL_HIST."ENC_INFO",
    VW_TAL_HIST."DT_FASE_FENOL",
    VW_TAL_HIST."AREA_PRESERVACAO",
    VW_TAL_HIST."AREA_RESERVA",
    VW_TAL_HIST."POSTO",
    VW_TAL_HIST."PH_ULTC",
    VW_TAL_HIST."DATA_BISADO",
    VW_TAL_HIST."COD_USU_BISA",
    VW_TAL_HIST."ID_CONTROLE",
    VW_TAL_HIST."PCALDO_EST",
    VW_TAL_HIST."PLANTAS",
    VW_TAL_HIST."TIPO_CULT",
    VW_TAL_HIST."ANA76",
    VW_TAL_HIST."ANA77",
    VW_TAL_HIST."ANA78",
    VW_TAL_HIST."ANA79",
    VW_TAL_HIST."ANA80",
    VW_TAL_HIST."ANA81",
    VW_TAL_HIST."ANA82",
    VW_TAL_HIST."ANA83",
    VW_TAL_HIST."ANA84",
    VW_TAL_HIST."ANA85",
    VW_TAL_HIST."ANA86",
    VW_TAL_HIST."ANA87",
    VW_TAL_HIST."ANA88",
    VW_TAL_HIST."ANA89",
    VW_TAL_HIST."ANA90",
    VW_TAL_HIST."ANA91",
    VW_TAL_HIST."ANA92",
    VW_TAL_HIST."ANA93",
    VW_TAL_HIST."ANA94",
    VW_TAL_HIST."ANA95",
    VW_TAL_HIST."ANA96",
    VW_TAL_HIST."ANA97",
    VW_TAL_HIST."ANA98",
    VW_TAL_HIST."ANA99",
    VW_TAL_HIST."ANA100",
    VW_TAL_HIST."ANA76_EST",
    VW_TAL_HIST."ANA77_EST",
    VW_TAL_HIST."ANA78_EST",
    VW_TAL_HIST."ANA79_EST",
    VW_TAL_HIST."ANA80_EST",
    VW_TAL_HIST."ANA81_EST",
    VW_TAL_HIST."ANA82_EST",
    VW_TAL_HIST."ANA83_EST",
    VW_TAL_HIST."ANA84_EST",
    VW_TAL_HIST."ANA85_EST",
    VW_TAL_HIST."ANA86_EST",
    VW_TAL_HIST."ANA87_EST",
    VW_TAL_HIST."ANA88_EST",
    VW_TAL_HIST."ANA89_EST",
    VW_TAL_HIST."ANA90_EST",
    VW_TAL_HIST."ANA91_EST",
    VW_TAL_HIST."ANA92_EST",
    VW_TAL_HIST."ANA93_EST",
    VW_TAL_HIST."ANA94_EST",
    VW_TAL_HIST."ANA95_EST",
    VW_TAL_HIST."ANA96_EST",
    VW_TAL_HIST."ANA97_EST",
    VW_TAL_HIST."ANA98_EST",
    VW_TAL_HIST."ANA99_EST",
    VW_TAL_HIST."ANA100_EST",
    VW_TAL_HIST."COR_GIS",
    VW_TAL_HIST."TON_OUTRAS",
    VW_TAL_HIST."AREA_OUTRAS",
    VW_TAL_HIST."MAPA",
    VW_TAL_HIST."AGOSTE_EST",
    VW_TAL_HIST."BISADO",
    VW_TAL_HIST."VIVEIRO",
    VW_TAL_HIST."SEMANAS_APAR",
    VW_TAL_HIST."PESO_FRUTO",
    VW_TAL_HIST."COD_VIVE",
    VW_TAL_HIST."DENSIDADE",
    VW_TAL_HIST."TEM_CURVA_PROD",
    VW_TAL_HIST."DATA_REAL_INI_COL",
    VW_TAL_HIST."ULT_LIB_COD",
    VW_TAL_HIST."ULT_LIB_AREA",
    VW_TAL_HIST."ULT_LIB_TCH",
    VW_TAL_HIST."NR_COL_S1",
    VW_TAL_HIST."NR_COL_S2",
    VW_TAL_HIST."NR_COL_S3",
    VW_TAL_HIST."NR_COL_S4",
    VW_TAL_HIST."FILEIRA_PLANTA",
    VW_TAL_HIST."ESPACO_PLANTA",
    VW_TAL_HIST."RESPONSAVEL",
    VW_TAL_HIST."CO_CCUSTO",
    VW_TAL_HIST."DS_COMENTARIO",
    VW_TAL_HIST."CD_ALMOXAGR",
    VW_TAL_HIST."NR_COMEDOURO",
    VW_TAL_HIST."TIPOTAL",
    VW_TAL_HIST."LARVAS",
    VW_TAL_HIST."SOLO_SERIE",
    VW_TAL_HIST."SOLO_ORDEM",
    VW_TAL_HIST."TEXTURAS_CLAS",
    VW_TAL_HIST."PORC_RACOES",
    VW_TAL_HIST."RACOES",
    VW_TAL_HIST."ID_GRP",
    VW_TAL_HIST."TURMA",
    VW_TAL_HIST."QT_DIAS_MADURA"
    FROM NNAPRD.VW_TAL_HIST,
    (SELECT DISTINCT USERID, LOGIN, SETOR
    FROM (SELECT C.ID_USR USERID,
    C.DS_LOGIN LOGIN,
    A.SETOR SETOR
    FROM NNAPRD.DD_GRP_SIA_SET A,
    NNAPRD.DD_GRP_USR B,
    NNAPRD.DD_USR C
    WHERE A.GRUPO_USR = B.ID_GRP
    AND B.ID_USR = C.ID_USR
    UNION ALL
    SELECT E.ID_USR USERID,
    E.DS_LOGIN,
    D.SETOR SETOR
    FROM NNAPRD.DD_USR_SIA_SET D, NNAPRD.DD_USR E
    WHERE D.USUARIO = E.ID_USR)) VW_SEG_SET,
    (SELECT DISTINCT USERID, LOGIN, FAZENDA
    FROM (SELECT C.ID_USR USERID,
    C.DS_LOGIN LOGIN,
    A.FAZENDA FAZENDA
    FROM NNAPRD.DD_GRP_SIA_FAZ A,
    NNAPRD.DD_GRP_USR B,
    NNAPRD.DD_USR C
    WHERE A.GRUPO_USR = B.ID_GRP
    AND B.ID_USR = C.ID_USR
    UNION ALL
    SELECT E.ID_USR USERID,
    E.DS_LOGIN,
    D.FAZENDA FAZENDA
    FROM NNAPRD.DD_USR_SIA_FAZ D, NNAPRD.DD_USR E
    WHERE D.USUARIO = E.ID_USR)) VW_SEG_FAZ
    WHERE NNAPRD.VW_TAL_HIST.SETOR = VW_SEG_SET.SETOR
    AND NNAPRD.VW_TAL_HIST.FAZ = VW_SEG_FAZ.FAZENDA
    AND VW_SEG_FAZ.LOGIN = ?) s,
    "NNAPRD"."CLG$HISTORIA" li
    WHERE li.DMLTYPE$$ = 'I'
    AND s."SETOR" = m."SETOR"
    AND s."FAZ" = m."FAZ"
    AND s."LOTE" = m."LOTE"
    AND s."TAL" = m."TAL"
    AND li."DATA_ULTCOL" = s."DATA_ULTCOL"
    AND li."FAZ" = s."FAZ"
    AND li."LOTE" = s."LOTE"
    AND li."SETOR" = s."SETOR"
    AND li."TAL" = s."TAL"
    AND (l.CLID$$OWN IS NULL OR
    l.CLID$$OWN != CONS_EXT.GET_CURR_CLIENT))
    Regards,

  • Database Link Error ORA-00904: "function_name": invalid identifier

    Hi Everyone,
    We are using Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production.
    We have production and reporting databases. We have a link from reporting to production that we use to create tables on the reporting database by selecting from tables and/or views on the productions database.
    We have to problem selecting from any view or table unless the query uses a stored function on the production database. Then we get the ORA-00904: "function_name": invalid identifier error even though the user that uses the link is created on both databases and the user hase execute privileges on the function.
    Has anyone else ever had this problem or have any suggestions?
    Any help would be greatly appreciated.
    Thanks!
    Ken

    Hi
    Post an example.
    Ott Karesz
    http://www.trendo-kft.hu

  • INVALID IDENTIFIER error in SEQUEL statement

    I'm having trouble with this SELECT statement in a report with search items. The search item in Question is the string "Email." Any activity record that has "Email" in the activity_type field is to be selected. The line of code is:
    select user_name,total from (select user_name,count(*) total from eba_ver2_cust_activity where activity_type = Email group by user_name )
    order by 2 desc,2 desc
    There are some substitutions in here. The value "Email" is from :P23_ACTIVITY_TYPE on the page.
    The error I get is:
    failed to parse SQL query:
    ORA-00904: "EMAIL": invalid identifier
    The problem is that the String constant is being interpreted as an identifier name. Some sbustitutions are made to general the SELECT statement that fails. The relevant portion of the code generating the erroneous SELECT is:
    if :P23_ACTIVITY_TYPE != '%null%' and :P23_ACTIVITY_TYPE is not null then
    if :P23_START_DATE is not null or :P23_END_DATE is not null then
    l_sql := l_sql || ' and activity_type_id = ' || :P23_ACTIVITY_TYPE ;
    else
    l_sql := l_sql || ' where activity_type_id = ' || :P23_ACTIVITY_TYPE ;
    end if;
    Either way, the contents of :P23_ACTIVITY_TYPE are treated as an identifier instead of a string. Please help.
    Steve "the n00b" in Raleigh NC

    Hi, Aaron.
    I tried what you said, and my code wouldn't parse correctly. Let me show you the whole module of PL/SQL that I'm dealing with here. I did not write this. This is something I'm maintaining and updating. The part that chokes is near the bottom.
    declare
    l_sql varchar2(4000) := 'select user_name,total from (select user_name,count(*) total from eba_ver2_cust_activity ' ;
    begin
    if :P23_START_DATE is not null and :P23_END_DATE is not null then
    l_sql := l_sql || ' where ACTIVITY_DATE between ''' || to_char(to_date(:P23_START_DATE,'dd-mon-yyyy'),'dd-mon-yyyy')
    || ''' and ' || '''' || to_char(to_date(:P23_END_DATE,'dd-mon-yyyy') ,'dd-mon-yyyy') || '''' ;
    elsif :P23_START_DATE is not null then
    l_sql := l_sql || ' where ACTIVITY_DATE >= ''' || to_char(to_date(:P23_START_DATE,'dd-mon-yyyy'),'dd-mon-yyyy') ||
    elsif :P23_END_DATE is not null then
    l_sql := l_sql || ' where ACTIVITY_DATE <= ''' || to_char(to_date(:P23_END_DATE,'dd-mon-yyyy'),'dd-mon-yyyy') || ''''
    end if;
    if :P23_ACTIVITY_TYPE != '%null%' and :P23_ACTIVITY_TYPE is not null then
    if :P23_START_DATE is not null or :P23_END_DATE is not null then
    l_sql := l_sql || ' and activity_type_id = ' || :P23_ACTIVITY_TYPE ;
    else
    l_sql := l_sql || ' where activity_type_id = ' || :P23_ACTIVITY_TYPE ;
    end if;
    end if;
    l_sql := l_sql || ' group by user_name )' ;
    return l_sql ;
    end ;
    I appreciate all the help. As for the job market for Apex programmers around here, I wouldn't know. I was a COBOL programmer for many years. I'm approaching retirement, and this will probably be my last IT job.
    Steve "the n00b" in Raleigh NC

  • Query with error "...Invalid Identifier"

    Hi
    I have a query that returns an error as follows:
    ORA-00904: "AT_HOURLY_ATTENDANCE_RECORDS"."ABSENCE_TYPE": invalid identifier
    The code is as follows:
    SELECT
            AT_HOURLY_ATTENDANCE_RECORDS.absence_type AS "value",
            AT_HOURLY_ATTENDANCE_RECORDS.absence_type AS "LABEL",
            '2' AS "SORTORDER"
            FROM AT_HOURLY_ATTENDANCE_RECORDS
            WHERE
           AT_HOURLY_ATTENDANCE_RECORDS.district_number = ('1000')
            AND AT_HOURLY_ATTENDANCE_RECORDS.SCHOOL_ID IN ('705')
            AND AT_HOURLY_ATTENDANCE_RECORDS.SCHOOL_YEAR = '2006'
    ORDER BY SORTORDER,LABELAll suggestions and help are gratefully acknowledged. Thanks in advance

    Hmmm, very similar error with one of your others posts :
    help with query with sub query
    Same cause, same effect ?
    Nicolas.

  • GROUP BY Clause -SQL Devolper error 00904. 00000 -  "%s: invalid identifier

    I'm a real novice with SQL and I am having a problem understanding why this doesn't work. Searching the web got me to this forum, but I haven't been able to find a solution. Obviuosly I don't really understand how to use the GROUP BY clause. The SQL works fine without that clause.
    As stated in the subject I am getting this error:
    ORA-00904: "SORTPLAN": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    Error at Line: 9 Column: 17
    With this SQL statement:
    SELECT START_DTM,
    END_DTM,
    MACHINE_SORT_PROGRAM_NAME as Sortplan,
    sum(TOTAL_PIECES_FED_CNT) AS TotalFed
    FROM END_OF_RUN
    WHERE MODS_DATE BETWEEN '27-Jul-2011' AND '27-Jul-2011'
    AND MAIL_OPERATION_NBR =919
    AND SITE_ID = 81003
    GROUP BY Sortplan
    ORDER BY Sortplan;
    TIA
    Mike

    Gary,
    Thank you for pointing me in the right direction. There are so many choices here I had a hard time deciding which to use. :)
    I tried your suggestion and still got an error. I had thought I didn't need to use aggregate functions on all of the fields. I guess that was wrong, so I changed it. Once I did that the SQL worked fine.
    ORA-00979: not a GROUP BY expression
    00979. 00000 - "not a GROUP BY expression"
    *Cause:   
    *Action:
    Error at Line: 2 Column: 3
    SELECT MACHINE_SORT_PROGRAM_NAME AS Sortplan,
    min(START_DTM),
    max(END_DTM),
    sum(TOTAL_PIECES_FED_CNT) AS TotalFed
    FROM END_OF_RUN
    WHERE MODS_DATE BETWEEN '27-Jul-2011' AND '27-Jul-2011'
    AND MAIL_OPERATION_NBR =919
    AND SITE_ID = 81003
    GROUP BY MACHINE_SORT_PROGRAM_NAME
    ORDER BY Sortplan;
    Mike

  • Hi we are getting Errors in file /apps/oh2/diag/rdbms/bsdp12/BSDP122/trace/BSDP122_q01c_5899122.trc: ORA-00904: "UTL_RAW"."CAST_FROM_NUMBER": invalid identifier  alert in alertlog

    Errors in file /apps/oh2/diag/rdbms/bsdp12/BSDP122/trace/BSDP122_q01c_5899122.trc:
    ORA-00904: "UTL_RAW"."CAST_FROM_NUMBER": invalid identifier
    DB version 11.2.0,.4
    and Replication getting ab-ended with below error
      SourceLine         
    : [817]
    2015-03-29 14:07:12  ERROR   OGG-00665  OCI Error executing single row select (status = 26695-ORA-26695: error on call to dbms_lock.release: return code 4
    ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 197
    ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 240
    ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 493
    ORA-06512: at "SYS.DBMS_APPLY_ADM_INTERNAL", line 2375
    ORA-26790: Requesting a lock on set_dml_conflict_handler "" timed out
    ORA-06512: at "SYS.DBMS_XSTREAM_GG_ADM", line 335
    ORA-06512: at line 1), SQL<DECLARE   PRAGMA AUTONOMOUS_TRANSACTION;BEGIN   dbms_xstream_gg_adm.set_dml_conflict_handler(
    apply_name=>:1, source_object=>:2, object=>:
    3,
    conflict_handler_name=>:4, operation_name=>:5, conflict_type=>:6,
    method_name=>:7, column_list=>:8, resolution_column=>:9);END;>.
    Thanks

Maybe you are looking for