Parameter not accessible in SQL statement

Hello
I am assigning value to 2 parameters on the form (PARAMETER node)
:parameter.p1:=5;
:parameter.p2:='AAA';
p1 is of number type and p2 is of char type.
now i want to query as follows
select count(*) from AA_table where id=:parameter.p1 and name=:parameter.p2;
this statement return count=0, which is wrong. actual count is 1.
why param values are not taken in SQL statement, as i display values of parameters using message(), it shows the values properly.....
plzzzzzz..... help.......

parameter datatype by default is char. So I doubt though you assign 5 to p1 it considers as a character.
Try below
select count(*) from AA_table where id=to_number(:parameter.p1) and name=:parameter.p2;
or change the data type to number for p1
Rajesh Alex

Similar Messages

  • Error-local collection types not allowed in SQL statements

    TYPE WEEK_NUM_T  IS VARRAY(10) OF VARCHAR2(10);
    vc_weeknum WEEK_NUM_T;
    SELECT DISTINCT to_char(y.week_number_in_year) BULK COLLECT INTO vc_weeknum
        FROM DD_TMP x, TIME y
        WHERE x.DATE_TM = y.ORACLE_DATE;
    INSERT INTO TMP_HOLD
        (SELECT *
             FROM TMP
             WHERE DATE_TM IN (SELECT * FROM TABLE(vc_weeknum));It seems like the TABLE() function don't work. What is the workaround?

    You haven't provided enough of your code to tell, but you are probably trying to use a pl/sql type instead of a sql type. Please see the reproduction of error, then correction below.
    -- reprouction of error:
    scott@ORA92> CREATE TABLE tmp_hold AS SELECT * FROM dept WHERE 1 = 2
      2  /
    Table created.
    scott@ORA92> DECLARE
      2    TYPE WEEK_NUM_T     IS VARRAY(10) OF VARCHAR2(10);
      3    vc_weeknum WEEK_NUM_T;
      4  BEGIN
      5    SELECT DISTINCT deptno
      6    BULK   COLLECT INTO vc_weeknum
      7    FROM   emp;
      8 
      9    INSERT INTO TMP_HOLD
    10    SELECT *
    11    FROM   dept
    12    WHERE  deptno IN
    13             (SELECT * FROM TABLE(vc_weeknum));
    14  END;
    15  /
             (SELECT * FROM TABLE(vc_weeknum));
    ERROR at line 13:
    ORA-06550: line 13, column 31:
    PLS-00642: local collection types not allowed in SQL statements
    ORA-06550: line 13, column 25:
    PL/SQL: ORA-22905: cannot access rows from a non-nested table item
    ORA-06550: line 9, column 3:
    PL/SQL: SQL Statement ignored
    -- correction:
    scott@ORA92> CREATE OR REPLACE TYPE WEEK_NUM_T AS TABLE OF VARCHAR2(10);
      2  /
    Type created.
    scott@ORA92> DECLARE
      2    vc_weeknum WEEK_NUM_T;
      3  BEGIN
      4    SELECT DISTINCT deptno
      5    BULK   COLLECT INTO vc_weeknum
      6    FROM   emp;
      7 
      8    INSERT INTO TMP_HOLD
      9    SELECT *
    10    FROM   dept
    11    WHERE  deptno IN
    12             (SELECT * FROM TABLE (CAST (vc_weeknum AS week_num_t)));
    13  END;
    14  /
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT * FROM tmp_hold
      2  /
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
    scott@ORA92>

  • Procedure not checking each sql statement.

    Hi All,
    I have created 2 tables names are A1 and B1. A1 table has some fields. Fields are no,sal,comm.,load_date. In A1 table NO (column) is the primary key.
    Second table is B1. this table has id,phone_no and load_date. In this table constraint
    ID column is the Not null.
    After that I have created 2 procedures one for A1 and one for B1. with in those procedures I used SQL insert statements.
    In procedures I used some valid sql statements and some invalid statements ( invalid statements means that I have specified constraint that’s why I specified duplicated and null values). While executing the procedures procedure shows error because of invalid statement and in that procedures I did not specify any Exceptions.
    If I specify Exceptions in procedures executing successfully some records are not loading procedure is comeing out. How do we mention server needs to be check and every insert sql startement.
    EX:
    If I give 6 records from 1 to 3 valid statements. I mentioned 4 th record copy of previos record( duplicated). 5 th record and 6 th valid records.
    Procedure executing successfully. Procedure loaded 1 to 4 records after that not loaded 5,6 and 7 records. How do we specify for record inserts 7. actually 7 th record is valid statement we should be insert this record. Please tell me how do we handle sql statements each and every one successfully or not.
    create or replace procedure a_proc as
    --declare
    begin
    insert into a1 values (100,2000,300,sysdate);
    insert into a1 values(200,1000,400,sysdate);
    insert into a1 values(300,3000,500,sysdate);
    insert into a1 values(400,6000,600,sysdate);
    insert into a1 values(400,900,700,sysdate);
    insert into a1 values(400,10000,1200,sysdate);
    insert into a1 values(900,11000,1300,sysdate);
    commit;
    EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('ERROR - '||sqlerrm);
    end a_proc;
    In B1 table colums are ID,PHONE_NO and Load_date. ID is not null column.
    For B1 population I have created one procedure
    create or replace procedure b_proc as
    --declare
    begin
    insert into b1 values(1,123456,sysdate); -- 1 record
    insert into b1 (phone_no,load_date) values (7896538,sysdate); --2 record
    insert into b1 (phone_no) values(6763723458); ----3 record
    insert into b1 (phone_no) values(453465778); --4 record
    insert into b1 values(400,72894894,sysdate); --5 record
    insert into b1 values(500,72894894,sysdate); --6 record
    commit;
    EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('ERROR - '||sqlerrm);
    end b_proc;
    if I execute above procedure procedure executing successfully but procedure inserting only first record not inserting 5th and 6th record. How do we exception for 5th and 6th records also.
    Thanks and Regards,
    Venkat

    {color:#808080}{color:#333300}Hi,
    Please find answer to your question below:{color}
    Venkat: Procedure executing successfully. Procedure loaded 1 to 4 records after that not loaded 5,6 and 7 records. How do we specify for record inserts 7. actually 7 th record is valid statement we should be insert this record. Please tell me how do we handle sql statements each and every one successfully or not.
    {color}
    {color:#0000ff}Guna: The procedure hits an exception after 4th record, and does not process anymore as it exits out of the procedure, I believe the data is not committed as well. You need handle exceptions if the processing has to continue. Same is the belwo case as well
    {color}{color:#333300}Regards,
    Guna{color}

  • NOT A VALID SQL STATEMENT EUL-3587

    I 've put the following SQL statement in a custom folder but the admin edition does not accept it. Could anyone tell me why??
    I kee getting the message from the subject.
    I am using version; 4.1.48.06.00 on Windows XP
    Greetz
    Eelco
    SELECT DECODE ((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)),
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 39), '0 t/m 39',
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 60), '40 t/m 60',
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 90), '61 t/m 90',
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 120), '91 t/m 120','> 120'),
    gis_notas.odg_volgnum,
    gis_notas.DEBITEURNUM,
    gis_notas.NOTA_NUM,
    gis_debiteuren_og.INC_STATUS,
    gis_notas.BEDRAG,
    gis_notas.OPENSTAAND_BDG,
    SUM (gis_notas.openstaand_bdg)
    FROM gis_debiteuren_og gis_debiteuren_og,
    gis_notas gis_notas
    WHERE ((gis_debiteuren_og.odg_volgnum = gis_notas.odg_volgnum
    AND gis_debiteuren_og.debiteurnum = gis_notas.debiteurnum
    AND gis_debiteuren_og.externe_bron = gis_notas.externe_bron
    AND gis_debiteuren_og.srt_externe_code = gis_notas.srt_externe_code))
    AND (gis_debiteuren_og.inc_status in ('INV'))
    AND (gis_notas.openstaand_bdg <> 0)
    AND (gis_debiteuren_og.odg_volgnum IN (1))
    AND LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 60) is not null
    GROUP BY DECODE ((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)),
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 39), '0 t/m 39',
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 60), '40 t/m 60',
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 90), '61 t/m 90',
    LEAST((TRUNC(SYSDATE- gis_notas.nota_verzend_dat)), 120), '91 t/m 120','> 120'),
    gis_notas.odg_volgnum,
    gis_notas.DEBITEURNUM,
    gis_notas.NOTA_NUM,
    gis_notas.BEDRAG,
    gis_notas.OPENSTAAND_BDG,
    gis_debiteuren_og.INC_STATUS

    Hi,
    Try using an alias for you all your calculated columns, e.g.
    SUM (gis_notas.openstaand_bdg) SUM_OPENSTAAND_BDG
    Hope that helps,
    Rod West

  • Just a helpful SAP note for slow SQL statements

    Hi Guys,
    Just wanted to share this SAP note with you. I am sure many of you might have gone through it.
    [SAP Note 155413 - Analysis of slow SQL statements|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=155413]
    Cheers,
    Abu

    >
    ZAFCO ABAP wrote:
    > Hi Guys,
    >
    > Just wanted to share this SAP note with you. I am sure many of you might have gone through it.
    >
    > [SAP Note 155413 - Analysis of slow SQL statements|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=155413]
    >
    > Cheers,
    > Abu
    Hi,
    I would bet not as many as you might think -  many questions here suffering form not GOING through
    the analysis before they post it here. 
    Meantime I think questions to SQL statement performance here will only be answered when the execution plan on the statement  is posted with it.
    bye
    yk

  • PLS-00642: local collection types not allowed in SQL statements

    Hi,
    I want to retrieve empno in plsql table.
    Now based on the empno in plsql table I want to retrieve thier deptno in another plsql table/varray.
    SQL> declare
      2   type vdeptno  is table of number;
      3    v_deptno vdeptno;
      4    TYPE e_tab is table of  PLS_INTEGER INDEX BY PLS_INTEGER;
      5    empno_tab e_tab;
      6   Begin
      7  Select empno bulk collect into empno_tab FROM emp;
      8  FOR i in empno_tab.FIRST..empno_tab.LAST
      9  LOOP
    10   dbms_output.put_line(empno_tab(i));
    11   Select deptno into v_deptno
    12   FROM emp
    13    where empno=empno_tab(i);
    14   END loop;
    15  END;
    16  /
    Select deptno into v_deptno
    ERROR at line 11:
    ORA-06550: line 11, column 21:
    PLS-00642: local collection types not allowed in SQL statementsAny other way to do the same.
    Twinkle

    When you use this method ...
    type vdeptno is table of number;
    v_deptno vdeptno;
    You need to allocate space to the object prior to inserting into it , (use .EXTENDS for this). Or you need to initialize it while declaring it.
    or try the following
    SQL> declare
    2 type vdeptno is table of number;
    3 v_deptno vdeptno;
    4 TYPE e_tab is table of PLS_INTEGER INDEX BY PLS_INTEGER;
    5 empno_tab e_tab;
    6 Begin
    7 Select empno bulk collect into empno_tab FROM emp;
    8 FOR i in empno_tab.FIRST..empno_tab.LAST
    9 LOOP
    10 dbms_output.put_line(empno_tab(i));
    11 Select deptno bulk collect into v_deptno
    12 FROM emp
    13 where empno=empno_tab(i);
    14 END loop;
    15 END;
    16 /
    Edited by: user9276238 on Jun 14, 2010 3:26 AM

  • Alert not firing for SQL Statement Script

    Hi All,
    I have defined an alter which will trigger when a requisition is stuck with the requestor.
    At the time i need to send an email to the requestor and update the status of the requisition to 'INCOMPLETE'.
    i have defined two action sets one for email and another for update. The email part is working fine but the sql script which updates the status is not firing.
    It is a standard script residing in PO directory sql.
    It has two parameters
    1) Requisition number 2) org_id
    these two are the output of the mail alert query.
    i have defined the application as 'Puchasing'
    arguments as &SQL_REQ_NUMBER &SQL_ORG_ID
    and gave the file name 'poresreq.sql' in the file location.
    but the status is not updating.
    how can i know the reason for not firing.
    Regards,
    Jana

    Hi Jana;
    What is your EBS and OS? Did you run query manualy? Did you get any error message?
    Regard
    Helios

  • PASSING PARAMETER IN SQL STATEMENT .

    HI,
    Can any one tell me how to use on of the field name as a parameter in the same sql statement ? Here is what i am looking for :
    SELECT EMPNO, DEPTNO, (SELECT COUNT(ORDERNO) FROM ORDERS WHERE DEPTNO = :DEPTNO AND EMPNO = :EMPNO) TOTAL_ORDER FROM EMP;
    Here the embeded sql statment should take the paramter :DEPTNO , :EMPNO from the main sql statement. That means , each DEPTNO, EMPNO should be passed as a aparameter to the embeded SQL statement.
    Thanks
    Feroz

    WHATS THE CONACT, ||, +, HOW TO USE IT, CAN U GIVE ME AN EXAMPLE.
    SORRY , HERE IS THE ACTUAL THING WHAT I AM LOOKING FOR, I WANT TO GET THE MEDIAN AND MODE VALUE IN ORACLE, BUT COZ ORACLE DOES NOT HAVE IN BUILT FUNCTION TO ET THE ABOVE TOW , I WROTE MY SQL STATEMENTS, FOR EXAMPLE THE MEDIAN OF SAL FOR DEPT 20 IS IS
    SELECT AVG(SAL) FROM
    (SELECT RowNum The_Rownum, SAL FROM
    (SELECT SAL FROM EMP WHERE DEPTNO = 20 ORDER BY 1)) V
    WHERE V.The_Rownum = ( SELECT FLOOR((COUNT(SAL)+1)/2) FROM EMP WHERE DEPTNO = 20)
    OR V.the_rownum = (SELECT CEIL((count(SAL)/2) + 1/2) FROM EMP WHERE DEPTNO = 20)
    This median value ncalculation i can put in a functio and return it, but for a record os 1,800,000 volume, calling this function that many times, the sql never executes. It just hangs. so i thought if i can emabede the whole calculaton in the main sql statement instead of writing a function and calling that function in the sql statement. But the median calculation needs the department no as a parameter to calculate the median for that perticular department. Here , where the requirement of PARAMETER comes. ANY IDEA ???
    Thanks
    Feroz

  • Passing parameter into SQL statement in Crystal Reports

    Hi all,
    I would like to call Crystal Reports in JSP. I can handle it well now. But I hope to let user input their selection criteria before printing out the report. I know how to get the parameter value in JSP, but I really dunno how to pass these parameter values into the SQL statement in Crystal Report. Actually, is it possible to do so?
    If anyone has idea, please tell me. Thx Thx!
    Regards,
    Betty

    Dear Sir,
    I want to use Crystal Report as a web base using JSP. But, I am getting how to call .rpt file in .jsp file & passing of parameter.
    If you have any idea, please reply as early as possible
    Thanking U.
    My userid = [email protected]
    Regds
    Pankaj..

  • Group by sql statement is not sorted.

    execut sql statement include group by clause in a oci program, the result is not sorted.
    I don't know why..
    in SqlPlus, same sql statement return sorted data.
    SELECT A.SHOP_ID,A.RESALE_TYPE,
    SUM(A.DEAL_AMT,0) DEAL_AMT
    FROM SHOP_ACC A, CD_TAB C
    WHERE A.RESALE_TYPE = C.CD(+)
    AND C.GB = 'AB'
    AND A.ACC_M = :s_AccMonth
    AND DEAL_GB='FOD'
    GROUP BY A.SHOP_ID,A.RESALE_TYPE
    But, RESALE_TYPE is outer join on CD_TAB..
    if remove outer join between CD_TAB and SHOP_ACC,
    sql statement is return sorted result.
    and if modify the column RESALE_TYPE like
    RESALE_TYPE||']' or NVL(RESALE_TYPE,'AAA')
    return sorted result..
    please help..
    thanks for your kind.

    thank you.. for reply..
    I knew that order by clause make to sort.
    but, using group by clause alone in SQL statement, that return sorted results too.
    I was found a fault that outer join table CD_TAB column of one is not symbloc "(+)" in SQL statement
    SELECT A.SHOP_ID,A.RESALE_TYPE,
    SUM(A.DEAL_AMT,0) DEAL_AMT
    FROM SHOP_ACC A, CD_TAB C
    WHERE A.RESALE_TYPE = C.CD(+)
    AND C.GB = 'AB' <----------- AND C.GB(+) = 'AB'
    AND A.ACC_M = :s_AccMonth
    AND DEAL_GB='FOD'
    GROUP BY A.SHOP_ID,A.RESALE_TYPE
    I want to know that why in other application - such as SqlPlus or SqlGate and ..etc. - this fault was ignore.. but OCI application such as my application programs is not ignore.. and is not sorted..
    thank you..

  • Assigning values to 2 fields using sql statement

    db11g , apex 4.0 and firefox 24 ,
    hi all ,
    i am trying to follow this tutorial to assign values to 2 items on a page using sql statement ,
    and i am using the same sql statement the tutorial uses
    select d.loc location, count(e.empno) num_employees from dept d, emp e where d.deptno = e.deptno(+) and d.deptno = :P3_DEPTNO group by d.loc -- btw , what does the "+" sign mean?
    after the e.deptno in the where condition .
    but i am facing this error
    1 error has occurred
    Wrong number of columns selected in the SQL query. See Help of attribute for details.
    and it does not work with two columns in the select statement under any conditions , i tried to remove the group function and the group clause ,
    it does not work unless i use only one column in the select statement ??
    thanks

    Pars
    And how exactly is this rewrite of the sql statement resolving the OP's issue.
    You are still using more than 1 column which will still result in the error message:
    Wrong number of columns selected in the SQL query.
    As mentioned in my earlier post APEX 4.0 (the version the OP is using) does not handle a sql statement with multiple columns for the dynamic action Set Value.
    Which means the fastest  and simplest solution is splitting up the dynamic action in multiple Set Value actions.
    Using this plugin or upgrade to a newer apex version would also be a possibility.
    Nicolette

  • How to view the SQL statement generated during execution of the BW Query?

    Dear Experts,
    I am trying to retrieve data in a SAP BW Query from a Non-SAP system.
    I think if I am able to see the complete SQL statement that was generated when I executed the BW Query, I may be able to use it to retrieve the data.
    Do you know how and where I can see the SQL statement of a BW Query's SQL statement?
    I tried RSRT options to execute the Query but still could not find the SQL statement.
    Thanks in advance.
    Regards,
    Shunhui.

    hi
    goto rsrt
    give your query name
    select execute + debug option
    in the debug option under data manager check the check box "display SQL/BIA query
    selcet continue
    you can see the sql statement
    thanq

  • IScript problem - Cannot use an input in a sql statement

    I get the input from an input box and it is correct
    &param = %Request.GetParameter("Dept");
    I try to use it in a sql statement lke this and nothing displays even though it its entered correctly and the value exists in the table
    Local SQL &usersCursor = CreateSQL("SELECT EMPLID, BIRTHDATE, NAME FROM PS_EMPLOYEES WHERE DEPTNAME_ABBRV = '&param'");
    If I leave out the single quotes around and do it like this &param then it errors out
    Local SQL &usersCursor = CreateSQL("SELECT EMPLID, BIRTHDATE, NAME FROM PS_EMPLOYEES WHERE DEPTNAME_ABBRV = &param");
    I need help structuring this correctly
    Thanks,
    Allen Cunningham

    Hi,
    CreateSQL does not execute the sql statement, it just creates an SQL object, which you have to execute.
    Something like this:
    &param = %Request.GetParameter("Dept");
    Local SQL &usersCursor = CreateSQL("SELECT EMPLID, BIRTHDATE, NAME FROM PS_EMPLOYEES WHERE DEPTNAME_ABBRV = :1", &param);
    While usersCursor.Fetch(&Emplid, &Birthdate, &Name)
    /* do processing*/
    End-While;

  • Oracle Parsing SQL Statement in ANSI or Oracle Format

    I have problem with a Query ..It seems to be Oracle Bugs .
    When I enter below simple Query (in Oracle Join format ), It works properly
    select * from (
    select dept.*,emp.ename from dept,emp
    where dept.deptno=emp.deptno(+)
    where deptno in
    select deptno a from
    select deptno,dname from dept where deptno=10
    UNION ALL
    select deptno,dname from dept where deptno=20
    But When I changed it and use it in ANSI Format ,it is not parsed and shows me ORA-00920: invalid relational operator error ......
    Below shows the changes that I have made to convert it to ANSI Format.
    select * from (
    select dept.*,emp.ename from dept
    left outer join emp on (emp.deptno=dept.deptno)
    where (deptno) in
    select deptno a from
    select deptno,dname from dept where deptno=10
    UNION ALL
    select deptno,dname from dept where deptno=20
    It seems to be Oracle bugs.I appreciate everybody to help me.
    ( Comments : I use Oracle 9i R2 on Windows and I can not change the SQL statement
    because it is created dynamically)
    Best regards

    This sort of technical question needs to be addressed to one of the technical forums. Products | Database | SQL and PL/SQL would seem to be appropriate here.
    Have you tried applying the latest patchset for your database? Seems to work for me on 9.2.0.5
    SCOTT @ HP92 Local> select * from (
      2  select dept.*,emp.ename from dept
      3  left outer join emp on (emp.deptno=dept.deptno)
      4  )
      5  where (deptno) in
      6  (
      7  select deptno a from
      8  (
      9  select deptno,dname from dept where deptno=10
    10  UNION ALL
    11  select deptno,dname from dept where deptno=20
    12  )
    13  )
    14  /
        DEPTNO DNAME          LOC           ENAME
            10 ACCOUNTING     NEW YORK      CLARK
            10 ACCOUNTING     NEW YORK      KING
            10 ACCOUNTING     NEW YORK      MILLER
            20 RESEARCH       DALLAS        SMITH
            20 RESEARCH       DALLAS        JONES
            20 RESEARCH       DALLAS        SCOTT
            20 RESEARCH       DALLAS        ADAMS
            20 RESEARCH       DALLAS        FORD
    8 rows selected.
    SCOTT @ HP92 Local> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
    PL/SQL Release 9.2.0.5.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for 32-bit Windows: Version 9.2.0.5.0 - Production
    NLSRTL Version 9.2.0.5.0 - ProductionJustin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Using Native Query to run a SQL statement, the "getResultList" throws excep

    I run the following code and I get an exception, can someone tell me what I'm doing wrong? I tried debugging, but as soon as I try even stepping into the "getResultList" line, it throws the exception.
    public void setData(EntityManager emgr) {
    System.err.println(m_sqlStatement);
    Query q = emgr.createNativeQuery(m_sqlStatement);
    @SuppressWarnings("unchecked")
    List<List<Object>> c = q.getResultList();
    for (List<Object> d : c) {
    if (d == null || d.isEmpty()) {
    continue;
    addRow(d.toArray());
    }I took this sql statement and created a test view and ran it against my database and I get the data that I want the way that I want it. So, I feel pretty confident that the problem is not with my sql statement.
    m_sqlStatement =
    SELECT TimeSubmitted AS "Time Completed", ActivityName AS "Activity", PN AS "Part Number", OpNum AS "Op Num", isConforming AS "Conforming?", SetupHrs AS "Expected Setup Time (Hrs.)", RunHrs AS "Expected Run Time (Hrs.)" FROM CellManager INNER JOIN Routings ON Routings.ID=CellManager.RoutingsRef INNER JOIN PNTable ON PNTable.ID=Routings.PNRef INNER JOIN ActivityType ON ActivityType.ID=CellManager.ActivityTypeRef INNER JOIN Activity ON Activity.CellManagerRef=CellManager.ID WHERE CellManager.OperatorLogRef=15 Order BY TimeSubmitted
    Exception thrown:
    SEVERE: Application class productionefficiencyviewergui.ProductionEfficiencyViewerGUIApp failed to launch
    Local Exception Stack:
    Exception [TOPLINK-6132] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Query argument " not found in list of parameters provided during query execution.
    Query: DataReadQuery(){code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I run the following code and I get an exception, can someone tell me what I'm doing wrong? I tried debugging, but as soon as I try even stepping into the "getResultList" line, it throws the exception.
    public void setData(EntityManager emgr) {
    System.err.println(m_sqlStatement);
    Query q = emgr.createNativeQuery(m_sqlStatement);
    @SuppressWarnings("unchecked")
    List<List<Object>> c = q.getResultList();
    for (List<Object> d : c) {
    if (d == null || d.isEmpty()) {
    continue;
    addRow(d.toArray());
    }I took this sql statement and created a test view and ran it against my database and I get the data that I want the way that I want it. So, I feel pretty confident that the problem is not with my sql statement.
    m_sqlStatement =
    SELECT TimeSubmitted AS "Time Completed", ActivityName AS "Activity", PN AS "Part Number", OpNum AS "Op Num", isConforming AS "Conforming?", SetupHrs AS "Expected Setup Time (Hrs.)", RunHrs AS "Expected Run Time (Hrs.)" FROM CellManager INNER JOIN Routings ON Routings.ID=CellManager.RoutingsRef INNER JOIN PNTable ON PNTable.ID=Routings.PNRef INNER JOIN ActivityType ON ActivityType.ID=CellManager.ActivityTypeRef INNER JOIN Activity ON Activity.CellManagerRef=CellManager.ID WHERE CellManager.OperatorLogRef=15 Order BY TimeSubmitted
    Exception thrown:
    SEVERE: Application class productionefficiencyviewergui.ProductionEfficiencyViewerGUIApp failed to launch
    Local Exception Stack:
    Exception [TOPLINK-6132] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Query argument " not found in list of parameters provided during query execution.
    Query: DataReadQuery(){code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • SAP Kernel Version in SAP Component

    Hi to everyone I have a simple question. When you have an Early Watch Alert report. There is a column about "SAP Components". There is "PI_BASIS", SAP_BASIS, SRM_PLUS. SAP_ABA, SAP_AP, SRM_SERVER, ST-A/PI, ST-PI. Which component is referred to SAP Ke

  • I have .mac and iCloud accounts on my ipad

    Do I really need both on my iPad.  If not, which should be deleted?

  • Lost Library and Rebuild Help Needed

    Hi, I was on here a few months ago, still haven't solved my problem so I'd thought I'd post my questions again. I had a library of 11,000+ photos that one day decided not to show up in iPhoto. I just saw black boxes and ! everywhere my photos normall

  • Workflow not triggered for BP when start condition's field is set by BADI

    Hi guys, I have created a workflow and given the start Event "Changed" of object BUS1006. In this I have given a start condition which triggers this event when a particular field on transaction BP is populated. Now the problem is that when I myself e

  • Photos duplicating upon import

    After upgrading to iPhoto 5 recently, all my pix have begun to duplicate upon import. Why is this and how can i stop it?