How could I replace hard coded value in my sql query with constant value?

Hi all,
Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
PROCEDURE class_by_day_get_bin_data
     in_report_parameter_id   IN   NUMBER,
     in_site_id               IN   NUMBER,
     in_start_date_time       IN   TIMESTAMP,
     in_end_date_time         IN   TIMESTAMP,
     in_report_level_min      IN   NUMBER,
     in_report_level_max      IN   NUMBER
IS
  bin_period_length   NUMBER(6,0); 
BEGIN
  SELECT MAX(period_length)
     INTO bin_period_length
    FROM bin_data
     JOIN site_to_data_source_lane_v
       ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
     JOIN bin_types
       ON bin_types.bin_type = bin_data.bin_type 
   WHERE site_to_data_source_lane_v.site_id = in_site_id
     AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
     AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
     AND bin_data.bin_type            =  2
     AND bin_data.period_length       <= 60;
  --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
  --report.
  DELETE FROM edr_class_by_day_bin_data;
   SELECT site_to_data_source_lane_v.site_id,
         site_to_data_source_lane_v.site_lane_id,
         site_to_data_source_lane_v.site_direction_id,
         site_to_data_source_lane_v.site_direction_name,
         bin_data_set.start_date_time,
         bin_data_set.end_date_time,
         bin_data_value.bin_id,
         bin_data_value.bin_value
    FROM bin_data
    JOIN bin_data_set
      ON bin_data.bin_serial = bin_data_set.bin_serial
    JOIN bin_data_value
      ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
    JOIN site_to_data_source_lane_v
         ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
        AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
    JOIN (
           SELECT CAST(report_parameter_value AS NUMBER) lane_id
             FROM report_parameters
            WHERE report_parameters.report_parameter_id    = in_report_parameter_id
              AND report_parameters.report_parameter_group = 'LANE'
              AND report_parameters.report_parameter_name  = 'LANE'
         ) report_lanes
      ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
    JOIN (
           SELECT CAST(report_parameter_value AS NUMBER) class_id
             FROM report_parameters
            WHERE report_parameters.report_parameter_id    = in_report_parameter_id
              AND report_parameters.report_parameter_group = 'CLASS'
              AND report_parameters.report_parameter_name  = 'CLASS'
         ) report_classes
      ON bin_data_value.bin_id = report_classes.class_id
    JOIN edr_rpt_tmp_inclusion_table
      ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
   WHERE site_to_data_source_lane_v.site_id = in_site_id
     AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
     AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
     AND bin_data_set.start_date_time >= in_start_date_time
     AND bin_data_set.start_date_time <  in_end_date_time
     AND bin_data.bin_type            =  2
     AND bin_data.period_length       =  bin_period_length;
END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
bin_data.bin_type            =  2But I dont want any hard coded number or string in the query.
How could I replace it?
I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
bin_type     CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
Thanks.
Edited by: user10641405 on May 29, 2009 1:38 PM

Declare the constant inside the procedure.
PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
                                    in_site_id             IN NUMBER,
                                    in_start_date_time     IN TIMESTAMP,
                                    in_end_date_time       IN TIMESTAMP,
                                    in_report_level_min    IN NUMBER,
                                    in_report_level_max    IN NUMBER) IS
  bin_period_length NUMBER(6, 0);
  v_bin_type     CONSTANT NUMBER := 2;
BEGIN
  SELECT MAX(period_length)
    INTO bin_period_length
    FROM bin_data
    JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                       site_to_data_source_lane_v.data_source_id
    JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
   WHERE site_to_data_source_lane_v.site_id = in_site_id
     AND bin_data.start_date_time >=
         in_start_date_time - numtodsinterval(1, 'DAY')
     AND bin_data.start_date_time <
         in_end_date_time + numtodsinterval(1, 'DAY')
     AND bin_data.bin_type = v_bin_type
     AND bin_data.period_length <= 60;
  --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
  --report.
  DELETE FROM edr_class_by_day_bin_data;
  INSERT INTO edr_class_by_day_bin_data
    (site_id,
     site_lane_id,
     site_direction_id,
     site_direction_name,
     bin_start_date_time,
     bin_end_date_time,
     bin_id,
     bin_value)
    SELECT site_to_data_source_lane_v.site_id,
           site_to_data_source_lane_v.site_lane_id,
           site_to_data_source_lane_v.site_direction_id,
           site_to_data_source_lane_v.site_direction_name,
           bin_data_set.start_date_time,
           bin_data_set.end_date_time,
           bin_data_value.bin_id,
           bin_data_value.bin_value
      FROM bin_data
      JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
      JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
                             bin_data_value.bin_data_set_serial
      JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                         site_to_data_source_lane_v.data_source_id
                                     AND bin_data_set.lane =
                                         site_to_data_source_lane_v.data_source_lane_id
      JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
              FROM report_parameters
             WHERE report_parameters.report_parameter_id =
                   in_report_parameter_id
               AND report_parameters.report_parameter_group = 'LANE'
               AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
                                                                                     report_lanes.lane_id
      JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
              FROM report_parameters
             WHERE report_parameters.report_parameter_id =
                   in_report_parameter_id
               AND report_parameters.report_parameter_group = 'CLASS'
               AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
                                                                                        report_classes.class_id
      JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
                                          TRUNC(edr_rpt_tmp_inclusion_table.date_time)
     WHERE site_to_data_source_lane_v.site_id = in_site_id
       AND bin_data.start_date_time >=
           in_start_date_time - numtodsinterval(1, 'DAY')
       AND bin_data.start_date_time <
           in_end_date_time + numtodsinterval(1, 'DAY')
       AND bin_data_set.start_date_time >= in_start_date_time
       AND bin_data_set.start_date_time < in_end_date_time
       AND bin_data.bin_type = v_bin_type
       AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data;

Similar Messages

  • Abap query with constante value

    hello,
    I wish to create several abap query since tables MKPF and MSEG for the inventory mouvements. each query for a type of inventory turnover (101, 501,…), but I should not put the code movement in criteria of selection. it is necessary that the code movement should be fixed in the query. should-I declare the MSEG-BWART as a constante? where I can do it?
    thank you for your assistance.
    cordialy Said

    Hi,
    Variant is a good option. Here is one more stable option.
    Other option is to use following Code.
    RANGES : ran1  FOR MSEG-BWART.
    ran1-sign = 'I'.
      ran1-option = 'EQ'.
      ran1-low = 101.
      APPEND ran1.
    ran1-sign = 'I'.
      ran1-option = 'EQ'.
      ran1-low = 501.
      APPEND ran1.
    Then use ran1 similar to select option.
    Hope this will help you.
    Darshan

  • Hp J6480 left cover hinge broken while changing cartridge. How could I replace that?

    HP OFFICEJET J6480 ALL-IN-ONE. The left HINGE of the cover has broken while changing the cartridge.  How could I replace it?
    Thanks
    James
    This question was solved.
    View Solution.

    Can't replace it. Just remove 1/2 of it. 
    Officejet J6480 All-in-One
    I have the right hinge broken.  I removed the 5 screws,
    one for the hinge cover in the back, and
    4 holding the top hinge in place.
    Once removed the top closed fine.  I will be careful in opening it to replace the ink.  It takes a hex head screw driver: T9 X 40.  I got a new cartridge and it is working fine with the top half of the hinge gone. Note:  the bottom broke but I removed the top only.
    I have not tried any major copy jobs or scanning but I don't see that they would be effected.
    HP Tec Support offered me a 6500N for ~ $100 about $30 off from what I could get from Sam's Club.  Not sure if it is the exact printer from Sam's.

  • How could i replace my ipod nano in UAE????

    I have heard about apple recalling 1st generation ipod nano  and I have one...how could I replaced it in UAE?...thank you...
    I bought it in 2007..

    Click here and follow the instructions.
    (118419)

  • How can i do with labview program,when i have 20 different values,and 1 want to add it with constant value.and how to get the results?

    how can i do with labview program,when i have   20 different values,and 1 want to add it with constant value.and how to get the results?

    Why do the 20 values have to be different? The same code should work even if some are equal.
    What do you mean by "get the result"? The result is available at the output terminal and all you need is a wire to get it where you need it. That could be an indicator, another operation, or even a hardware device.
    What is the data type of the 20 values? An array? A cluster? A bunch of scalars? A waveform? Dynamic data?
    LabVIEW Champion . Do more with less code and in less time .

  • How to pass the Bound values to VO SQL Query during runtime?

    Hi all,
    I have the following sql query;
    SELECT NOTIFICATION_ID
    FROM xx_NOTIFICATION_V
    WHERE COMPANY = NVL(:1, COMPANY)
    AND INITIATOR = NVL(:2,INITIATOR)
    AND PAYGROUP = NVL(:3, PAYGROUP)
    AND SOURCE = NVL(:4, SOURCE)
    AND SUPPLIER_NAME = NVL(:5,SUPPLIER_NAME)
    AND TRX_DATE BETWEEN NVL(:6,TRX_DATE)
    AND NVL(:7,TRX_DATE)      
    If i click GO button on search page then it pass the selected Poplists values as a Bound values to VO Sql query at runtime after this I store the search results in a Table(Which is created by using New Region Wizard).
    I want to pass the Bind parameter values to VO SQL query during runtime and :1,:2,:3,:4,:5,:6,:7 values are coming from Poplists.
    I search through forum I found many threads regarding Bind Values but those all are passing ID's only not String(Varchar) values.
    How to pass the Character values to VO Query.
    Please anyone help me on this.
    Thanks in Advance.

    Hi All,
    Below one is the recent error Stack.
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT NOTIFICATION_ID
    , COMPANY
    , PAYGROUP
    , SOURCE
    , INITIATOR
    , SUPPLIER_NAME
    , TRX_DATE
    FROM LMG_NOTIFICATION_V
    WHERE COMPANY = NVL(:1,COMPANY)
    AND INITIATOR = NVL(:2,INITIATOR)
    AND PAYGROUP = NVL(:3,PAYGROUP)
    AND SOURCE = NVL(:4,SOURCE)
    AND SUPPLIER_NAME = NVL(:4,SUPPLIER_NAME)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:544)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01008: not all variables bound
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
         at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
         at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
         at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: ORA-01008: not all variables bound
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
         at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
         at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
         at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Please anyone help me on this?
    Thanks

  • How to create a matrix with constant values and multiply it with the output of adc

    How to create a matrix with constant values and multiply it with the output of adc 

    nitinkajay wrote:
    How to create a matrix with constant values and multiply it with the output of adc 
    Place array constant on diagram, drag a double to it, r-click "add dimension". There, a constant 2D double array, a matrix.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?

    How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?
    Let's say the SQL Server and Oracle Database are in the same Company Internet Network.
    I have the code, but I do not know how to use it. Such as what is System DSN Name? Where could I get it. What does it look like?
    Do I need to install any Oracle Client Software in order to link from SQL Server to Oracle? Or SQL Server has the built-in drivers installed already that I can directly create a Linked Server from SQL Server to Oracle?
    I need to know details. Thanks.
    USE master
    go
    EXEC sp_addlinkedserver
         @server  = '{Linked Server Name}'
        ,@srvproduct = '{System DSN Name}'
        ,@provider  = 'MSDASQL'
        ,@datasrc  = '{System DSN Name}'
    EXEC sp_addlinkedsrvlogin
         @rmtsrvname = '{Linked Server Name}'
        ,@useself  = 'False'
        ,@locallogin = NULL
        ,@rmtuser  = '{Oracle User Name}'
        ,@rmtpassword = '{Oracle User Password}'

    You need an OLE DB provider for Oracle. There is one that ships with Windows, but it only supports very old versions of Oracle. Oracle has an OLE DB provider that you can use. I don't know if it's part of Oracle Client or how it is bundled.
    You should not use MSDASQL or any DSN.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to force readObejct query with PK value to go to DB?

    The default behaviour for read-object queries with a PK value is to use the cache and not go to the database. How can we change this behaviour?
    We have cases that a row was deleted by some other process not through toplink, but the corresponding object still in the cache and if you use the readObject query with PK value, the object will be returned as result.
    Thanks in advance,

    There are several mechanisms to disable caching in TopLink. Note that disabling caching will affect your performance.
    In 9.0.4 you can use:
    - You can configure you cache type to use a WeakIdentityMap to ensure that only referenced objects are cached.
    - On descriptor you can call disableCacheHits() and alwaysRefreshCache() in code or click these options on the Caching/Identity tab in the Mapping Workbench.
    - Or to explicitly remove a deleted object from the cache uses session.removeFromIdentityMap(), but you must ensure there are no other objects referencing it.
    In 10.1.3 you can also use:
    - On descriptor you can call setIsIsolated(true) in code, or select isolated in the Caching tab in the Mapping Workbench.
    - Alternatively you can set a CacheInvalidationPolicy on your descriptor to ensure objects are not cached for longer than a specified time, or invalidated daily.
    - Or to explicitly invalidate a deleted object use, session.getIdentityMapAccessor().invalidateObject()

  • How to pass a value into a SQL Query?

    Hi There,
    I want to know if there is a possibility to pass a dynamic value in a sql query. For example I have a currency rate value (ex: rate = 1.319, 2.23 etc) which user wants to input when running the query (The rate is not taken from the system, so I cannot compare to any table column and pass it as a parameter).
    And this rate has to be used in my query to do some calculation. Is this possible? The value :p_currency_rate doesn't work
    Any ideas please?
    Thank you,
    Prathibha

    SELECT DISTINCT
    hou.name
    ,poh.segment1 po_num
    ,pol.line_num po_line_num
    ,poh.currency_code
    --,trunc(poh.creation_date) po_creation_date
    ,pol.cancel_flag
    ,msi.segment1 item_num
    ,pol.unit_price
    ,round(cost.item_cost,5)
    ,round((&p_rate * pol.unit_price),5) "CONVERSION"
    ,(cost.item_cost - round((&p_rate * pol.unit_price),5)) difference
    ,pov.vendor_name
    FROM
    po.po_headers_all poh
    ,po.po_lines_all pol
    ,po.po_vendors pov
    ,hr.hr_all_organization_units hou
    ,inv.mtl_system_items_b msi
    ,bom.cst_item_costs cost
    WHERE
    poh.po_header_id = pol.po_header_id
    and pov.vendor_id = poh.vendor_id
    and poh.org_id = hou.organization_id
    and hou.organization_id = :p_operating_unit
    and poh.currency_code = :p_currency
    and poh.creation_date between :po_creation_date_from and :po_creation_date_to
    and poh.type_lookup_code = 'BLANKET'
    and msi.inventory_item_id = pol.item_id
    and cost.INVENTORY_ITEM_ID = pol.ITEM_ID
    --and (cost.item_cost - pol.unit_price) <> 0
    and (cost.item_cost - round((&p_rate * pol.unit_price),5)) <> 0
    and cost.organization_id = 1
    and msi.organization_id = 1
    and cost.cost_type_id = 3 --- Pending cost type
    and nvl(upper (pol.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(upper (poh.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(pol.cancel_flag, 'N') = 'N'
    and &p_rate user parameter
    I want this p_rate to be passed as a user parameter.

  • Validation Rules: create a dummy account with constant value 0

    Hi,
    I need to define a control like the following:
    TA00000 >= 0
    I think that I need to create a dummy account with constant value 0 and compare TA00000 against it. I need help to create the dummy account because I'm not sure if I have to use a script logic or not. If anybody could help, I would be very grateful.
    Thanks in advance.
    Almudena

    Hi,
    Thank you for your answer. It works perfectly.
    I have other question related to validation rules. I need to create a validation like this:
    A39300 + A39110 + A39130 + A39010 >= H97300
    It is not supported in BPC NW version to leave blank in ACCOUNT_R in details of validation rule. Do you know how I could define this control?
    Thanks in advance.
    Almudena

  • How to get tax break up of TDS using SQL query ?

    Hi all,
    We are developing a TDS report using SQL query
    Report will contain VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount,
    Bill Value – 100.000,
    TDS (2%) - 2.000,
    TDS Surcharge(10% on TDS) - 0.2,
    TDS Cess(2%(TDS+TDS Surcharge)) - 0.044,
    TDS HeCess(1%(TDS+TDS Surcharge)) - 0.022.
    We have developed this report which displays upto
    VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount.
    How to show tax break up of TDS in SQL query ?
    Thanks,
    With regards,
    Jeyakanthan.

    Hi gauraw,
    Thank for your reply.
    I modified the query , pasted the query
    as below in query generator,
    Select T0.DocNum,T0.DocDate,T0.CardCode as 'Ledger',T1.TaxbleAmnt As 'Bill value',T1.WTAmnt as 'TDSAmt',(TDSAmt * 0.1) as 'TDS_Surch',
    (((TDSAmt0.1) + TDSAmt)0.02)  as 'TDSCess',
    (((TDSAmt0.1) + TDSAmt)0.01)  as 'TDSHCess'
    FROM OPCH T0  INNER JOIN PCH5 T1 ON T0.DocEntry = T1.AbsEntry
    WHERE (T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]')
    on clicking execute its showing error message invalid column
    name 'TDSAmt'.
    With regards,
    Jeyakanthan

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • How to write sql query with many parameter in ireport

    hai,
    i'm a new user in ireport.how to write sql query with many parameters in ireport's report query?i already know to create a parameter like(select * from payment where entity=$P{entity}.
    but i don't know to create query if more than 1 parameter.i also have parameter such as
    $P{entity},$P{id},$P{ic}.please help me for this.
    thanks

    You are in the wrong place. The ireport support forum may be found here
    http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=showcat&catid=9

  • Retreiving a value from and SQL query

    If anyone can give me sample code or pointers to retreive a value from an sql query, I'd be greatful.
    Source code I've muddled together so far:
    Class seqNumType = Class.forName(nameOfClass);
    Constructor theConstructor = seqNumType.getConstructor(null);
    Object seqNumInstance = theConstructor.newInstance(null);
    String theStatement = "SELECT value INTO v_seqnum FROM DUAL;";
    OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall(theStatement);
    ocs.registerOutParameter( 1, OracleTypes.NUMBER, 0);
    Method method = seqNumInstance.getClass().getMethod("getORADataFactory", null);
    seqNumInstance = ocs.getORAData(1, (ORADataFactory)method.invoke(null,null));
    ocs.execute();
    Problem with this seems to be the ORADataFactory isn't a method of the class, but as I'm thumbling around in the dark here a little, I've no idea where to go from here. Is this just generally overkill anyway?
    Suggestions?
    Cheers for any help.

    Like this:
                ResultSet resultSet=statement.executeQuery("SELECT * FROM TEST");
                while(resultSet.next())
                    for(int i=0;i<resultSet.getMetaData().getColumnCount();i++)
                        System.out.print(resultSet.getObject(i+1).toString()+" ");
                    System.out.println();

Maybe you are looking for

  • Ipod 'music rescue 3.1.6 problem

    I'm not sure if this is the correct forum, but bear with me. All my iTunes and ipod were synced on my old PC which essentially just died (go figure). So I bought a Mac Book. I want to sync my ipod to my iTunes on my Mac so I can delete folders and su

  • Windows 7 + Crysis, will my MBP handle it?

    I have the ability to get an early copy of Windows 7 through my school. I used Boot camp to partition and install it on my MBP. I then installed Crysis Warhead on it, and played. My question is if I played Crysis through Windows 7 like that, will it

  • Aggregating variables and hiding/filtering values

    Hi Everyone I have a pivot table and chart (chart screenshot below) that has monthly intervals along the x-axis. The chart presents a cumulative percent based on aggregating records along the variable on the x axis. The problem is that I want to give

  • Does AppleCare cover water damage to the iPhone?

    I want to find out if AppleCare covers water damage?

  • How do I "install" iPhoto themes?

    I downloaded iPhoto '11 from the App Store, now my themes can't be located when I attempt to create a book. I can see the themes in my Library folder - Application Support - iPhoto - Themes, there are about 343 theme folders in there, so how can I "i