Primary Key Multiple Column with Date - parameter issue

All,
I am having an issue that I cannot find the answer to. I have looked high and low to no avail. Please help.
The issue at hand is that I have a table that has a multiple column primary key and one of the columns happens to be a date and the other is a string. I have a basic search and I want an update picture in the results table that the users can click on and go to a different page to update that record. The issue is when I fire an action based on the update picture I also want to set parameters based on the record that I selected. So I set the string parameter and that works fine. The issue is with the date. When i set the date parameter it works but it chops off the timestamp. Later when I try to get this parameter 'pageContext.getParameter("dateParameter");' it will bring in a date like 15-Dec-2008 but I need the entire date and timestamp (i.e. 15-Dec-2008 10:20:33) to correctly identify the record.
Please help!
Thanks,
Colby J

Hi
since every parameter go in url as a string format so u will never get the date parameter with complete timestamp,the solution would de
1.) Set a fire action on update picture,give its event name as "update",
2.) clicking on update picture will fire this event .
3.) in processFormrequest method of controller
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if ("update".equals(pageContext.getParameter("event")))
// this will give the select row where update is clicked
String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
VORowImpl row = (EmployeeSummaryVORowImpl)am.findRowByRef(rowReference);
Timestamp sdateVal=(String)row.getAttribute("Date value");
// this will transfer the values to next page
pageContext.putTransactionTransientValue("transferdvalue",sdateVal);
// and in the next page u can get the value like this
timestamp getDateVal=pageContext.getTransactionTransientValue("transferdvalue"l);
hope this will resolve your issue,Please let me know if u face any issue
thanx
Pratap

Similar Messages

  • Unique or primary key on timestamp with timezone

    Hi,
    I have been experimenting with a date column in a primary key, or actually I tried using a timestamp with time zone in a primary key.
    While researching whether there was a way to avoid ORA-02329, I found the following:
    K15> create table dumdum
      2    (datum date not null
      3    ,naamp varchar2( 30 ) not null);
    Table created.
    K15>
    K15> alter table dumdum
      2    add constraint d_pk
      3        primary key
      4          (datum, naamp)
      5    using index;
    Table altered.
    K15>
    K15> select ind.index_type
      2  from   user_indexes ind
      3  where  ind.index_name = 'D_PK';
    INDEX_TYPE
    NORMAL
    1 row selected.
    K15>
    K15> insert into dumdum
      2    (datum
      3    ,naamp )
      4  select sysdate - (level/1440)
      5  ,      'nomen nescio'
      6  from   dual
      7  connect by level < 1000
      8  ;
    999 rows created.
    K15>
    K15> analyze index d_pk validate structure;
    Index analyzed.
    K15> analyze table dumdum compute statistics;
    Table analyzed.
    K15>
    K15> select naamp
      2  from   dumdum
      3  where  datum > to_date('16-06-2011 15.46.16', 'dd-mm-yyyy hh24.mi.ss' )
      4 
    K15> For the last select statement I get the following "explain plan":
    SELECT STATEMENT  CHOOSE
              Cost: 2  Bytes: 247  Cardinality: 13       
         1 INDEX RANGE SCAN UNIQUE D_PK
                    Cost: 3  Bytes: 247  Cardinality: 13  This behavior lived up to my expectations.
    Then, I tried this:
    K15> create table dumdum
      2    (datum date not null
      3    ,naamp varchar2( 30 ) not null);
    Table created.
    K15>
    K15> alter table dumdum
      2    add constraint d_pk
      3        primary key
      4          (datum, naamp)
      5    using index;
    Table altered.
    K15>
    K15> alter table dumdum
      2        modify datum timestamp(6) with time zone;
    Table altered.
    K15>
    K15> select ind.index_type
      2  from   user_indexes ind
      3  where  ind.index_name = 'D_PK';
    INDEX_TYPE
    NORMAL
    1 row selected.
    K15>
    K15> insert into dumdum
      2    (datum
      3    ,naamp )
      4  select sysdate - (level/1440)
      5  ,      'nomen nescio'
      6  from   dual
      7  connect by level < 1000
      8  ;
    999 rows created.
    K15>
    K15> analyze index d_pk validate structure;
    Index analyzed.
    K15> analyze table dumdum compute statistics;
    Table analyzed.
    K15>
    K15> select naamp
      2  from   dumdum
      3  where  datum > to_date('16-06-2011 15.46.16', 'dd-mm-yyyy hh24.mi.ss' )
      4
    K15> So, at first glance, the alter table statement to change the datatype from DATE to TIMESTAMP seems like a way of fooling Oracle. But the explain plan reveals a different story:
    SELECT STATEMENT  CHOOSE
              Cost: 4  Bytes: 1,25  Cardinality: 50       
         1 TABLE ACCESS FULL DUMDUM
                    Cost: 4  Bytes: 1,25  Cardinality: 50  I was only fooling myself. :-0
    But I wasn't done with my research:
    K15> create table dumdum
      2    (datum timestamp(6) with time zone not null
      3    ,naamp varchar2( 30 ) not null);
    Table created.
    K15>
    K15> create unique index d_ind
      2      on dumdum
      3           (datum, naamp);
    Index created.
    K15>
    K15>
    K15> select ind.index_type
      2  from   user_indexes ind
      3  where  ind.index_name = 'D_IND';
    INDEX_TYPE
    FUNCTION-BASED NORMAL
    1 row selected.
    K15>
    K15> insert into dumdum
      2    (datum
      3    ,naamp )
      4  select systimestamp - (level/1440)
      5  ,      'nomen nescio'
      6  from   dual
      7  connect by level < 1000
      8  ;
    999 rows created.
    K15>
    K15> analyze index d_ind validate structure;
    Index analyzed.
    K15> analyze table dumdum compute statistics;
    Table analyzed.
    K15>
    K15> select naamp
      2  from   dumdum
      3  where  datum > to_date('16-06-2011 15.56.16', 'dd-mm-yyyy hh24.mi.ss' )
      4
    K15>Now, my explain plan looks fine:
    SELECT STATEMENT  CHOOSE
              Cost: 2  Bytes: 1,25  Cardinality: 50       
         1 INDEX RANGE SCAN UNIQUE D_IND
              Cost: 3  Bytes: 1,25  Cardinality: 50  Why is Oracle so adamant about not allowing a timestamp with time zone in a unique key? And, given their position on the matter, where does their tolerance for a unique index come from?
    By the way, if I had a say in it, I would not allow anything that even remotely looks like a date to be part of a primary key, but that's another discussion.
    Thanks,
    Remco
    P.S. All this is on Oracle9i Enterprise Edition Release 9.2.0.8.0. Is it different on 10g or 11g?

    See if this helps. You can create primary key for TIMESTAMP WITH LOCAL TIME ZONE datatype.
    SQL>CREATE TABLE Mytimezone(Localtimezone TIMESTAMP WITH LOCAL TIME ZONE primary key, Location varchar2(20) );
    Table created.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch4datetime.htm#i1006169
    TIMESTAMP WITH LOCAL TIME ZONE Datatype
    TIMESTAMP WITH LOCAL TIME ZONE is another variant of TIMESTAMP. It differs from TIMESTAMP WITH TIME ZONE as follows: data stored in the database is normalized to the database time zone, and the time zone offset is not stored as part of the column data. When users retrieve the data, Oracle returns it in the users' local session time zone. The time zone offset is the difference (in hours and minutes) between local time and UTC (Coordinated Universal Time, formerly Greenwich Mean Time).
    Thanks
    http://swervedba.wordpress.com/

  • Error while setWhereClauseParam in Controller with Date Parameter

    Hi All,
    I am strugling last couple days How to setWhereClauseParam in Controller with Date Parameter..
    We have requirment
    1, While search Page enter the Creation_date (Data Type is Date ) based on that feacthing ViewObject Query.
    2, I created the View Object Query as per below
    SELECT paa.creation_date, paa.date_start, paa.date_end,
    SYSDATE duty_resumption_date, paa.absence_days leave_deducted,
    paa.absence_days leave_added, 'Leave Deucted' detail,
    paa.absence_days balance_remaining,
    fu.user_id
    FROM per_absence_attendances paa, per_all_people_f papf, fnd_user fu
    WHERE papf.person_id = paa.person_id
    AND papf.person_id = fu.employee_id
    AND paa.creation_date <=TO_Date(:1,'DD-MON-YYYY')
    3, In ControlerCO with processFormRequest i write the code as per below
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OAViewObject oaviewobject = (OAViewObject)am.findViewObject("XXSearchVO");
    if (pageContext.getParameter("Go") != null)
    String created = pageContext.getParameter("Creation");
    if ((created != null) && (created.length() != 0)) {
    System.out.println("We are in Proces Form Request: " + created);
    oaviewobject.setWhereClause(null);
    oaviewobject.setWhereClauseParams(null);
    System.out.println("After SetWhereClauseParams Null:");
    oaviewobject.setWhereClauseParam(1,created);
    oaviewobject.executeQuery();
    OAAdvancedTableBean table = (OAAdvancedTableBean)webBean.findChildRecursive("ResultsTable");
    table.queryData(pageContext, false);
    4, After run XXSearchPG File am getting below error.
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT paa.creation_date, paa.date_start, paa.date_end,
    SYSDATE duty_resumption_date, paa.absence_days leave_deducted,
    paa.absence_days leave_added, 'Leave Deucted' detail,
    paa.absence_days balance_remaining,
    fu.user_id
    FROM per_absence_attendances paa, per_all_people_f papf, fnd_user fu
    WHERE 1 = 1
    AND papf.person_id = paa.person_id
    AND papf.person_id = fu.employee_id
    AND paa.creation_date <=TO_Date(:1,'DD-MON-YYYY')
    at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at OA.jspService(_OA.java:71)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: 2
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:8210)
    at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3916)
    at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
    at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13759)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:801)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
    at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
    at xxdbank.oracle.apps.per.selfservice.webui.XXSearchCO.processFormRequest(XXSearchCO.java:75)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at OA.jspService(_OA.java:71)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: 2
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:8210)
    at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3916)
    at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
    at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13759)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:801)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
    at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
    at xxdbank.oracle.apps.per.selfservice.webui.XXSearchCO.processFormRequest(XXSearchCO.java:75)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    at OA.jspService(_OA.java:71)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Please help me.
    Thanks
    Venkat Reddy Pulichintha
    [email protected]

    Hi Kumar,
    How are you? I hope u know about me. i worked in Fujitus we played cricket i stayed same falt in PUNE.
    As per you response i used but am facing below error.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT paa.creation_date, paa.date_start, paa.date_end,
    SYSDATE duty_resumption_date, paa.absence_days leave_deducted,
    paa.absence_days leave_added, 'Leave Deucted' detail,
    paa.absence_days balance_remaining,
    fu.user_id
    FROM per_absence_attendances paa, per_all_people_f papf, fnd_user fu
    WHERE papf.person_id = paa.person_id
    AND papf.person_id = fu.employee_id
    AND paa.creation_date <=TO_CHAR(:1,'DD-MON-YYYY')
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01722: invalid number
         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.execute_maybe_describe(OracleStatement.java:1048)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1126)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
         at xxdbank.oracle.apps.per.selfservice.webui.XXSearchCO.processFormRequest(XXSearchCO.java:69)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    java.sql.SQLException: ORA-01722: invalid number
         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.execute_maybe_describe(OracleStatement.java:1048)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1126)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
         at xxdbank.oracle.apps.per.selfservice.webui.XXSearchCO.processFormRequest(XXSearchCO.java:69)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Thanks
    Venkat Reddy Pulichintha
    [email protected]

  • Calling a package procedure with Date parameter only

    Hi All,
    Please help me to call a package procedure with Date parameter from sql prompt.
    Arif

    Check the below procedure.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure procdate (p_date_in date)
      2  is
      3  p_date_out date;
      4  begin
      5  p_date_out := add_months(p_date_in,6);
      6  dbms_output.put_line(p_date_out);
      7* end;
    SQL> /
    Procedure created.
    SQL> exec procdate('01-JAN-2010');
    01-JUL-10
    PL/SQL procedure successfully completed.
    SQL> exec procdate(to_date('01/01/2010','DD-MM-YYYY'));
    01-JUL-10
    PL/SQL procedure successfully completed.
    SQL> exec procdate('31-DEC-2010');
    30-JUN-11
    PL/SQL procedure successfully completed.

  • Handling multiple cursors with column of date datatype  issue reg

    Dear all,
    i am using three cursors in one pl/sql block each of this three cursor will fetch data based on column of date data type.i believe due to each condition relate to same table,contradiction may arise i.e
    1> when code will execute , cursor c1 will do the job perfectly but c2 & c3 here may not be able to solve the purpose since the job has already been done by cursor c1 which i am not sure.my doubts i need all cursor to work based on each condition.
    any suggestion from your side could sort out this issues.
    Thanks n regards
    Laxman
    begin
    for c1 in(select reqid from request where lastmoddate<sysdate - 8/24 and statuscode=1 and assigned_personid is not null)loop
    update srequest set status=open where reqid=c1.reqid;
    commit;
    end loop;
    for c2 in(select reqid from request where lastmoddate<sysdate - 1 and statuscode=1 and assigned_personid is null)loop
    update srequest set status=open where reqid=c2.reqid;
    commit;
    end loop;
    for c3 in(select reqid from request where lastmoddate<sysdate - 14 and statuscode=1 and assigned_personid is null)loop
    update srequest set status=open where reqid=c3.reqid;
    commit;
    end loop;

    If you look, your third cursor has already been included in your second cursor (sysdate - 14 < sysdate - 1), so there's only two conditions that you need to run.
    You're also doing row-by-row aka slow-by-slow processing. It would be much, much better (*) if you converted this to one SQL statement - I've rewritten it to be a MERGE statement:
    merge into srequest sreq
    using (select reqid
           from   request
           where  statuscode = 1
           and    ((lastmoddate < sysdate - 8/24
                    and assigned_person_id is not null)
                   or
                   (last_moddate < sysdate - 1
                    and assigned_person_id is null))) req
      on (sreq.reqid = req.reqid)
    when matched then
      update
        set status = 'OPEN';(*) more performant, easier to read, debug and maintain.

  • How can we export the Primary key values (along with other data) from an Advantage database?

    One of our customers is moving from our application (which uses Advantage Database Server) to another application (which uses other database technology). They have asked us to help export their data, so that they can migrate it to another database system. So far, we have used the Advantage Data Architect (ARC32) "Export Table Structures as Code" functionality to generate SQL. We used the "Include existing data" option. The SQL contains the necessary code to recreate the tables and indexes. The customer's IT staff will alter the SQL statements as necessary for their new system.
    However, there is an issue with the Primary Keys in these table. The resulting INSERT statements use AutoInc as the type for the Primary Key in each Table. These INSERT statements contains "DEFAULT" for the value of each of these AutoInc fields. The customer would like to output an integer value for each of these Primary Key values in order to maintain referential integrity in their new system.
    So far, I have not found any feature of ARC32 that allows us to export the Primary Key values. We had been using an older version of ARC32, since our application does not use the latest version of ADS. I did download the latest version of ARC32 (11.10), but it does not appear to include any new functionality that would facilitate doing this sort of export.
    Can somebody tell me if there is such a feature in ARC32?
    Or, is there is another Advantage tool to facilitate what we are trying to accomplish?
    If there are no Advantage tools to provide such functionality, what else would you suggest?

    George,
      It sounds like the approach you are using is the correct one. This seems to be the cleanest solution to me especially since the customer is able to modify the generated SQL statements for their new system.
      In order to preserve the AutoInc values I would recommend altering the table and changing the field datatype from AutoInc to Integer. Then export the table as code which will export the actual values. After the tables have been created on the new system they can change the field datatype back to an AutoInc type if necessary.
    Regards,
    Chris Franz

  • Urgent - ESB: DB Adapter with composite primary keys no returning any data

    I have a DB Adapter in the ESB that inserts/updates/selects data to/from a table with 2 columns as primary keys, but table has several columns.
    1. Initially, the db table had constraints for the composite primary key, The DB adapter had valid data coming in, but no result data.
    2. Then I removed the db constraints on the composite primary key, and selected the 2 columns in the DB adapter wizard. Still, valid data is going in, since I am outputing to a file prior to call this node, but no result data is appearing. The result XML is empty.
    Do I need to do something in Toplink for this?
    The table spec is below. the ACCT_FIELD and ACCT_CODE columns make up the composite primary key.
    CREATE TABLE AFF_DATA_SYNC
    ACCT_FIELD NUMBER NOT NULL,
    ACCT_CODE VARCHAR2(16) NOT NULL,
    ACCT_EXISTS_FLAG VARCHAR2(1),
    SAVE_ACCT_SEG_XML CLOB,
    LAST_UPDATE_DATE DATE
    The following xml is the request to the DB adapter:
    <top:AffDataSyncReadDBAdapterSelect_accountField_accountCodeInputParameters xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/AffDataSyncReadDBAdapter">
    <top:accountField>8</top:accountField>
    <top:accountCode>0003888</top:accountCode>
    </top:AffDataSyncReadDBAdapterSelect_accountField_accountCodeInputParameters>
    Log output:
    JCA: esb:///ESB_Projects/STRIPES-AFF-Data-Intg_AFF-Data-Integration/AffDataSyncReadDBAdapter.wsdl [ AffDataSyncReadDBAdapter_ptt::AffDataSyncReadDBAdapterSelect_accountField_accountCode(AffDataSyncReadDBAdapterSelect_accountField_accountCode_inparameters,Af
    DataSyncWipCollection) ] - No XMLRecord headers provided
    JCA: <oracle.tip.adapter.db.DBInteraction executeOutboundRead> Executing query with arguments [8, 0003917]
    JCA: <oracle.tip.adapter.db.TopLinkLogger log> SELECT ACCT_FIELD, ACCT_CODE, ACCT_EXISTS_FLAG, SAVE_ACCT_SEG_XML, LAST_UPDATE_DATE FROM
    AFF_DATA_SYNC_WIP WHERE ((ACCT_FIELD = ?) AND (ACCT_CODE = ?))
    bind => [8, 0003888]
    JCA: <oracle.tip.adapter.db.DBInteraction executeOutboundRead> Read the following objects: []
    Message was edited by:
    user589357
    Message was edited by:
    user589357
    Message was edited by:
    user589357
    Message was edited by:
    user589357

    The Toplink has no errors. Now I changed my table with only a single primary key, but for some reason, I am still getting no data.
    JDeveloper 10.1.3.3 / SOA Suite (only using ESB) 10.1.3.3 with Oracle DB 10g 10.2.0.3.
    1. What does No XMLRecord headers found mean?
    2. Notice the last log item; Read ... []
    Here are the log contents:
    Invoking next service "AffDataSyncReadDBAdapterSelect_recordId" with payload :
    <top:AffDataSyncReadDBAdapterSelect_recordIdInputParameters xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/AffDataSyncReadDBAdapter">
    <top:recordId>80003888</top:recordId>
    </top:AffDataSyncReadDBAdapterSelect_recordIdInputParameters>
    JCA: esb:///ESB_Projects/STRIPES-AFF-Data-Intg_AFF-Data-Integration/AffDataSyncReadDBAdapter.wsdl [ AffDataSyncReadDBAdapter_ptt::AffDataSyncReadDBAdapterSelect_recordId(AffDataSyncReadDBAdapterSelect_recordId_inparameters,AffDataSyncWipCollection)
    ] - No XMLRecord headers provided
    JCA: esb:///ESB_Projects/STRIPES-AFF-Data-Intg_AFF-Data-Integration/AffDataSyncReadDBAdapter.wsdl [ AffDataSyncReadDBAdapter_ptt::AffDataSyncReadDBAdapterSelect_recordId(AffDataSyncReadDBAdapterSelect_recordId_inparameters,AffDataSyncWipCollection)
    ] - Starting JCA LocalTransaction
    JCA: esb:///ESB_Projects/STRIPES-AFF-Data-Intg_AFF-Data-Integration/AffDataSyncReadDBAdapter.wsdl [ AffDataSyncReadDBAdapter_ptt::AffDataSyncReadDBAdapterSelect_recordId(AffDataSyncReadDBAdapterSelect_recordId_inparameters,AffDataSyncWipCollection)
    ] - Invoking JCA Outbound Interaction
    JCA: <oracle.tip.adapter.db.DBInteraction executeOutboundRead> executing the NamedQuery: AffDataSyncReadDBAdapter.AffDataSyncWip.AffDataSyncReadDBAdapterSelect
    JCA: <oracle.tip.adapter.db.DBInteraction executeOutboundRead> Parsing header record element.
    JCA: <oracle.tip.adapter.db.TopLinkLogger log> client acquired
    JCA: <oracle.tip.adapter.db.DBInteraction executeOutboundRead> Executing query with arguments [80003888]
    JCA: <oracle.tip.adapter.db.TopLinkLogger log> SELECT RECORD_ID, ACCT_FIELD, ACCT_CODE, ACCT_EXISTS_FLAG, SAVE_ACCT_SEG_XML, LAST_UPDATE_DATE
    FROM AFF_DATA_SYNC_WIP WHERE (RECORD_ID = ?)
    bind => [80003888]
    JCA: <oracle.tip.adapter.db.DBInteraction executeOutboundRead> Read the following objects: []
    Message was edited by:
    user589357
    Message was edited by:
    user589357

  • How to add primary key for table with existing data?

    The table is occupied data already. There was no primary key before, so for every column, there are some duplicate values.
    I want to add a new column, which should be of the datatype integer, and can automatically increment, starting from 001. I tried this in Oracle SQL Developer, but it says "ORA-01758: table must be empty to add mandatory (NOT NULL) column". How can I do it? Thanks!

    Hello, don't call the column ID, that could be an ID relating to anything. Perhaps be a little more specific like emp_id .
    Then to update it:
    UPDATE Employee emp
      SET emp_id = (
      SELECT row_num
        FROM (
      SELECT ROWID,
                 ROW_NUMBER() OVER (ORDER BY ROWID) row_num
        FROM Employee emp2) emp2
      WHERE emp.ROWID = emp2.ROWID);That will assign a new EMP_ID for each, beginning at 1.
    Then:
    ALTER TABLE Employee MODIFY emp_id NOT NULL;
    ALTER TABLE Employee ADD CONSTRAINT EMP_PK PRIMARY KEY (EMP_ID);Then create a sequence for future population of the Employee table:
    CREATE SEQUENCE emp_seq START WITH <maximum value of emp_id + 1>;

  • UPDATE multiple columns with conditional SET parameters

    I have a procedure that updates multiple columns of a table using the procedure's parameter. Is it possible to have one update statement with conditional SET parameter?
    CREATE TABLE TEMP
    (POL_NUM NUMBER,
    OED DATE,
    TERM NUMBER,
    TRANS_CD CHAR(2));
    INSERT INTO TEMP VALUES (1, '1 AUG 2009', 12, 'NB');
    INSERT INTO TEMP VALUES (2, '4 AUG 2009', 12, 'XL');
    INSERT INTO TEMP VALUES (3, '2 AUG 2009', 12, 'RN');
    COMMIT;
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM NUMBER,
      pOED IN DATE,
      pTERM IN NUMBER,
      pTRANS_CD CHAR2)
    AS
    BEGIN
      IF pOED IS NOT NULL THEN
        UPDATE TEMP SET OED = pOED WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTERM IS NOT NULL THEN
        UPDATE TEMP SET TERM = pTERM WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTRAN_CD IS NOT NULL THEN
        UPDATE TEMP SET TRANS_CD = pTRANS_CD WHERE POL_NUM = pPOL_NUM;
      END IF;
      COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
         NULL;
    END;Is it possible to replace multiple IFs from the code to have only one UPDATE statement with condition that update the column only if the passed parameter is not null? In real scenario I have more than 3 columns and I don't want to write many IF blocks.
    Please help Gurus!!
    Edited by: Kuul13 on Sep 18, 2009 1:26 PM

    Hi,
    You certainly don't want to issue separate UPDATE statements for every column; that will be really inefficent.
    SQL has several ways to implement IF-THEN-ELSE logic. CASE is the most versatile, but NVL will do everything you need for this job. You can use one of those to set a column to itself (and therefore not really update that column) when appropriate.
    For example:
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM   IN       NUMBER,
      pOED          IN   DATE,
      pTERM          IN   NUMBER,
      pTRANS_CD  IN       CHAR
    AS
    BEGIN
         UPDATE  temp
         SET     oed      = NVL (poed,       oed)
         ,     term      = NVL (pterm,       term)
         ,     trans_cd = NVL (ptrans_cd, trans_cd)
         WHERE     pol_num      = ppol_num;
      COMMIT;     -- Maybe
    END    tmp_proc;"EXCEPTION WHEN OTHERS THEN NULL" is almost always a bad idea. If there's an error, don't you want to know about it? Shouldn't you at least log a message in a warnings table or something?
    Think careflully about whether or not you want to COMMIT every time you call this procedure.
    Just as it's inefficient to issue a separate UPDATE statement for every column, it's also inefficient to issue a separate UPDATE statement for every row. If efficiency is important, it should be possible to UPDATE several rows in a single UPDATE statement, using NVL (or CASE, or COALESCE, or NULLIF, or NVL2, or ...).
    This was a very well-written question! Thanks for providing the CREATE TABLE and INSERT statements, and such a clear explanation.

  • Problem with Date Parameter

    Hi
    I am new to reporting services/report designer but have created a number of simple reports with Parameters using data from queries that have worked but I have a problem with this using Date and Time. 
    I am using MS Visual Studio 2008 (BIDS) and our SQL Server is Windows Server 2008 R2
    I need to allow the users of the report to choose a start date and an end date
    The Start Dates are held in a field called PhaseStartDate
    The End Dates are held in a field called PhaseEndDates
    I have tried multiple ways to try to get this to work with no success and with the latest attempt I get the message  
    "An error occurred during local report processing. The definition of the report 'JKVoidLoss' is invalid. The report parameter 'StartDate' has a default value or ValidValue that depends on the report parameter"Startdate". Forward dependancies
    are not valid"
    I will explain how I set up the Startdate. The EndDate is set up the same with the relevant values and fields.
    I created a new data source called StartDate. Under QUERY I have Select PhaseStartDate from QLHRA_VoidPhases. This runs okay when tested in Query designer and RUN.
    Under FIELDS I have Field name as PhaseStartDate and Field Source as PhaseStartdate
    Under PARAMETERS I have Parameter Name as PhaseStartDate and Parameter Value as [@StartDate]
    I set up a Parameter called StartDate with Data type as Date/Time
    Under Available Values I selected Get values from a query with Dataset being StartDate, Value field being PhaseStartdate and Label field being PhaseStartDate
    There are no Default Values
    I have tried moving the parameters up and down using the blue arrows under report data. I have tried multiple different methods to resolve this by changing values in the Properties screens.
    I also tried removing the DataSets and just using the Parameters with default settings. in preview, this ran the report but no matter what dates where entered the output was always the same.
    Any assistance will be greatly appreciated as I have spent hours on this so far
    Regards
    John

    Hi
    I am new to reporting services/report designer but have created a number of simple reports with Parameters using data from queries that have worked but I have a problem with this using Date and Time. 
    I am using MS Visual Studio 2008 (BIDS) and our SQL Server is Windows Server 2008 R2
    I need to allow the users of the report to choose a start date and an end date
    The Start Dates are held in a field called PhaseStartDate
    The End Dates are held in a field called PhaseEndDates
    I have tried multiple ways to try to get this to work with no success and with the latest attempt I get the message  
    "An error occurred during local report processing. The definition of the report 'JKVoidLoss' is invalid. The report parameter 'StartDate' has a default value or ValidValue that depends on the report parameter"Startdate". Forward dependancies are not valid"
    I will explain how I set up the Startdate. The EndDate is set up the same with the relevant values and fields.
    I created a new data source called StartDate. Under QUERY I have Select PhaseStartDate from QLHRA_VoidPhases. This runs okay when tested in Query designer and RUN.
    Under FIELDS I have Field name as PhaseStartDate and Field Source as PhaseStartdate
    Under PARAMETERS I have Parameter Name as PhaseStartDate and Parameter Value as [@StartDate]
    I set up a Parameter called StartDate with Data type as Date/Time
    Under Available Values I selected Get values from a query with Dataset being StartDate, Value field being PhaseStartdate and Label field being PhaseStartDate
    There are no Default Values
    I have tried moving the parameters up and down using the blue arrows under report data. I have tried multiple different methods to resolve this by changing values in the Properties screens.
    I also tried removing the DataSets and just using the Parameters with default settings. in preview, this ran the report but no matter what dates where entered the output was always the same.
    Any assistance will be greatly appreciated as I have spent hours on this so far
    Regards
    John
    As I understand what you need to do is to just remove parameter from the dataset query for populating the date values and then it should work fine
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Multiple columns in a Parameter

    Can anyone give me a head up how to do in BI publisher.
    There are two columns in table CODES (CodeNo, CodeDsc), I can put them into a LOV (?),
    In parameter I can use this LOV, but just show CodeDsc, user can choose one or more items, then the parameter passes multiple CodeNo into data model which WHERE cause is something like this:
    WHERE thecode IN (:mycodes)
    How to do this?
    Thanks.

    It seems like you answer your own question - at least for the standalone BI Publisher (not integrated in EBS, Peoplesoft, Siebel)
    1) LOV's allow you to have either 1 or 2 columns. if 1 column is used it is display and data column. otherwise
    what is displayed and what is passed to the parameter are in the 2 different columns.
    If you want to show both codeNo and CoDsc, you could have them concatinated in the query.
    2) If you check the checkbox that multiple values are allowed for a lov parameters, they are passed as a comma seperated list
    and can be put into a where clause just as you stated.
    What specific is the question? Is that about E-Business Sutie or Peoplesoft?
    Thanks,
    Klaus

  • Primary key problem using with oc4j

    Hi everyone
    I have deployed my entity bean in the oc4j container without any problem.But when I use the search->primary key in the console,no results display.
    detail:
    Step1I open the oc4j console by typing java -jar orion.jar -console
    the oc4j container is successfully built
    and in the left part of my console I see my entity bean
    step2 I click my entity bean and in the right of the console in the search->primary key I type the a number which exists in my table in the database.
    but no results display.
    the following is my datasource-file anf orion-ejb-jar file
    data-sources.xml
    <?xml version="1.0"?>
    <!DOCTYPE data-sources PUBLIC "-//Evermind//- Data-sources configuration" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
         <data-source
              class="com.evermind.sql.DriverManagerDataSource"
              name="jdbc/OracleDSCore"
              location="jdbc/OracleDSCore"
              pooled-location="jdbc/OracleDSPooled"
              xa-location="jdbc/xa/OracleDSXA"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username="SCOTT"
              password="TIGER"
              url="jdbc:oracle:thin:@localhost:1521:b2b"
         />
    </data-sources>
    orion-ejb-jar.xml
    <?xml version = '1.0' encoding = 'GBK'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="EMP" data-source="jdbc/OracleDSCore" table="EMP" >
    <primkey-mapping>
    <cmp-field-mapping>
    <fields>
    <cmp-field-mapping name="EMPNO"
    persistence-name="EMPNO" persistence-type="VARCHAR2(4)"/>
    </fields>
    </cmp-field-mapping>
    </primkey-mapping>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role>" impliesAll="true"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    Any answer is welcome. Thankou in advance!

    Fernando,
    I see you suffer a lot with ADF...write me at [email protected] and let´s keep in touch.
    Maybe we can do a Brazilian list for JDev/ADF.
    Regards,
    Marcelo Alcantara

  • Date Parameter Issue in XML Report

    Hi,
    I have developed a custom report using xml data definition, but it returns an error when running with date parameters.
    I have given the parameters like this..
    <?xml version='1.0' encoding='windows-1252'?>
    <dataTemplate name="XXX_REP" description= "XXX Report">
    <properties>
    <property name="xml_tag_case" value="upper"/>
    </properties>
    <parameters>
    <parameter name="P_ORG_ID"/>
    <parameter name="P_DIFFRENCE"/>
    <parameter name="P_FROM_DATE" dataType="date" format="RRRR/MM/DD HH24:MI:SS"/>
    <parameter name="P_TO_DATE" dataType="date" format="RRRR/MM/DD HH24:MI:SS"/>
    <parameter name="P_FROM_SO"/>
    <parameter name="P_TO_SO"/>
    </parameters>
    <lexicals></lexicals>
    <dataQuery>
    <sqlstatement name="Q1">
    --- />
    Error -
    XDO Data Engine Version No: 5.6.3
    Resp: 21623
    Org ID : 84
    Request ID: 670920
    All Parameters: P_ORG_ID=:P_DIFFRENCE=BREIF:P_FROM_DATE="2013/03/01 00:00:00":P_TO_DATE="2013/03/28 00:00:00":P_FROM_SO=:P_TO_SO=
    Data Template Code: XXX_REP
    Data Template Application Short Name: ONT
    Debug Flag: N
    {P_FROM_SO=, P_TO_SO=, P_TO_DATE=2013/03/28 00:00:00, P_DIFFRENCE=BREIF, P_FROM_DATE=2013/03/01 00:00:00, P_ORG_ID=}
    Calling XDO Data Engine...
    --SQLException
    java.sql.SQLDataException: ORA-01830: date format picture ends before converting entire input string
    Please help me to solve this issue?
    Thanks

    Please find the sql query,
    <?xml version='1.0' encoding='windows-1252'?>
    <dataTemplate name="XXX_REP" description= "Free Issue Audit Report">
    <properties>
    <property name="xml_tag_case" value="upper"/>
    </properties>
    <parameters>
    <parameter name="P_ORG_ID"/>
    <parameter name="P_DIFFRENCE"/>
    <parameter name="P_FROM_DATE" dataType="date" format="RRRR/MM/DD HH24:MI:SS"/>
    <parameter name="P_TO_DATE" dataType="date" format="RRRR/MM/DD HH24:MI:SS"/>
    <parameter name="P_FROM_SO"/>
    <parameter name="P_TO_SO"/>
    </parameters>
    <lexicals></lexicals>
    <dataQuery>
    <sqlstatement name="Q1">
    <![CDATA[
    SELECT tb2.name "OPR_UNIT",
    tb2.org_id "ORG_ID",
    tb2.header_id "HEADER_ID",
    tb2.order_number "ORDER_NUMBER",
    tb2.line_number "LINE_NUMBER",
    tb2.segment1 "ITEM",
    tb2.description "ITEM_DESC",
    tb2.ordered_date "ORDER_DATE",
    tb2.ordered_quantity "ORDER_QTY",
    free_qty "FREE_QTY",
    (tb2.ordered_quantity - tb2.free_qty) "DIFFRENCE"
    FROM (SELECT tb1.name,
    tb1.org_id,
    tb1.header_id,
    tb1.line_id,
    tb1.order_number,
    tb1.line_number,
    tb1.segment1,
    tb1.description,
    tb1.ordered_date,
    tb1.ordered_quantity,
    --xt.free_quantity "FREE_QTY",
    (SELECT XX_FREE_ISSUE_DISC_REP (oll.header_id, oll.line_id)
    FROM oe_order_lines_all oll
    WHERE oll.header_id = tb1.header_id
    AND oll.inventory_item_id = tb1.inventory_item_id
    AND unit_selling_price != 0 -- and oll.shipping_instructions is null
    free_qty,
    -- (tb1.ordered_quantity - xt.free_quantity) "DIFFRENCE",
    tb1.inventory_item_id
    FROM xx_free_issue xt,
    (SELECT ou.name,
    oh.org_id,
    oh.header_id,
    oh.order_number,
    ol.line_id,
    ol.line_number,
    it.segment1,
    it.description,
    ol.ordered_quantity,
    TO_CHAR (oh.ordered_date, 'DD-MON-YYYY') ordered_date,
    ol.inventory_item_id,
    ol.shipping_instructions
    FROM oe_order_headers_all oh,
    oe_order_lines_all ol,
    hr_all_organization_units ou,
    mtl_system_items_b it
    WHERE oh.header_id = ol.header_id
    AND oh.org_id = ou.organization_id
    AND ol.inventory_item_id = it.inventory_item_id
    AND ol.ship_from_org_id = it.organization_id
    -- AND ol.price_list_id = 6007 --Free Issues
    AND ol.shipping_instructions = 'Free Issue'
    --AND oh.order_number = '1001385'
    ) tb1
    WHERE TO_DATE (tb1.ordered_date) BETWEEN TO_DATE (
    NVL (
    xt.effective_date_from,
    SYSDATE))
    AND TO_DATE (
    NVL (
    xt.effective_date_to,
    SYSDATE))
    AND tb1.inventory_item_id = NVL (xt.item_id, xt.free_item_id)
    AND TO_DATE (tb1.ordered_date) BETWEEN TO_DATE (
    NVL (
    :P_FROM_DATE,
    tb1.ordered_date))
    AND TO_DATE (
    NVL (
    :P_TO_DATE,
    tb1.ordered_date))
    AND tb1.header_id BETWEEN NVL (:P_FROM_SO, tb1.header_id)
    AND NVL (:P_TO_SO, tb1.header_id)
    AND tb1.org_id IN (:P_ORG_ID, tb1.org_id)) tb2
    where (tb2.ordered_quantity - tb2.free_qty) = decode(:P_DIFFRENCE ,'DETAIL',(tb2.ordered_quantity - tb2.free_qty))
    union
    SELECT tb2.name "OPR_UNIT",
    tb2.org_id "ORG_ID",
    tb2.header_id "HEADER_ID",
    tb2.order_number "ORDER_NUMBER",
    tb2.line_number "LINE_NUMBER",
    tb2.segment1 "ITEM",
    tb2.description "ITEM_DESC",
    tb2.ordered_date "ORDER_DATE",
    tb2.ordered_quantity "ORDER_QTY",
    free_qty "FREE_QTY",
    (tb2.ordered_quantity - tb2.free_qty) "DIFFRENCE"
    FROM (SELECT tb1.name,
    tb1.org_id,
    tb1.header_id,
    tb1.line_id,
    tb1.order_number,
    tb1.line_number,
    tb1.segment1,
    tb1.description,
    tb1.ordered_date,
    tb1.ordered_quantity,
    --xt.free_quantity "FREE_QTY",
    (SELECT XX_FREE_ISSUE_DISC_REP (oll.header_id, oll.line_id)
    FROM oe_order_lines_all oll
    WHERE oll.header_id = tb1.header_id
    AND oll.inventory_item_id = tb1.inventory_item_id
    AND unit_selling_price != 0 -- and oll.shipping_instructions is null
    free_qty,
    -- (tb1.ordered_quantity - xt.free_quantity) "DIFFRENCE",
    tb1.inventory_item_id
    FROM xx_free_issue xt,
    (SELECT ou.name,
    oh.org_id,
    oh.header_id,
    oh.order_number,
    ol.line_id,
    ol.line_number,
    it.segment1,
    it.description,
    ol.ordered_quantity,
    TO_CHAR (oh.ordered_date, 'DD-MON-YYYY') ordered_date,
    ol.inventory_item_id,
    ol.shipping_instructions
    FROM oe_order_headers_all oh,
    oe_order_lines_all ol,
    hr_all_organization_units ou,
    mtl_system_items_b it
    WHERE oh.header_id = ol.header_id
    AND oh.org_id = ou.organization_id
    AND ol.inventory_item_id = it.inventory_item_id
    AND ol.ship_from_org_id = it.organization_id
    -- AND ol.price_list_id = 6007 --Free Issues
    AND ol.shipping_instructions = 'Free Issue'
    --AND oh.order_number = '1001385'
    ) tb1
    WHERE TO_DATE (tb1.ordered_date) BETWEEN TO_DATE (
    NVL (
    xt.effective_date_from,
    SYSDATE))
    AND TO_DATE (
    NVL (
    xt.effective_date_to,
    SYSDATE))
    AND tb1.inventory_item_id = NVL (xt.item_id, xt.free_item_id)
    AND TO_DATE (tb1.ordered_date) BETWEEN TO_DATE (
    NVL (
    :P_FROM_DATE,
    tb1.ordered_date))
    AND TO_DATE (
    NVL (
    :P_TO_DATE,
    tb1.ordered_date))
    AND tb1.header_id BETWEEN NVL (:P_FROM_SO, tb1.header_id)
    AND NVL (:P_TO_SO, tb1.header_id)
    AND tb1.org_id IN (:P_ORG_ID, tb1.org_id)) tb2
    where (tb2.ordered_quantity - tb2.free_qty) != decode(:P_DIFFRENCE ,'BREIF',0)
    ORDER BY 4,5 --tb2.order_number, tb2.line_number
    ]]>
    </sqlstatement>
    </dataQuery>
    <dataStructure>
    <group name="G1" source="Q1">
    <element name="OPR_UNIT" value="OPR_UNIT"/>
    <element name="ORG_ID" value="ORG_ID"/>
    <element name="HEADER_ID" value="HEADER_ID"/>
    <element name="ORDER_NUMBER" value="ORDER_NUMBER"/>
    <element name="LINE_NUMBER" value="LINE_NUMBER"/>
    <element name="ITEM" value="ITEM"/>
    <element name="ITEM_DESC" value="ITEM_DESC"/>
    <element name="ORDER_DATE" value="ORDER_DATE"/>
    <element name="ORDER_QTY" value="ORDER_QTY"/>
    <element name="FREE_QTY" value="FREE_QTY"/>
    <element name="DIFFRENCE" value="DIFFRENCE"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Thanks

  • Multiple Column with no information

    I have a Crystal Report 10 report made that uses multiple columns for the data in each group. The printing direction is set to be "Across then Down".
    Suppose a group has 10 rows. When I preview and export from Crystal Developer 10, the two columns show up with 5 rows each. When this report is deployed and created on Crystal Enterprise 10 (or I also tried this on Business Object InforView 3.1) the two columns still show up, but only the left column holds the data (i.e., it has all 10 rows) and the right column is blank.
    Does anyone know if there is a setting that I am missing somewhere in my report setup?
    Further information:
       Checked options:
           - Details > Common:
                  - Free-Form Placement
                  - Keep Together
                  - Format with Multiple Columns
           - Details > Layout
                  - Printing Direction: Across then Down
    - Group Options has "Repeat Group Header On Each Page" checked
    Edited by: Ryan Beaulieu on Nov 7, 2008 10:07 PM

    I've done some more different scenarios, and the same this is seen if it's created as an Excel sheet, but I also noticed that the results that I am getting on Crystal Enterprise 10/InfoView XI 3.1 are exactly what I am seeing if I am working in Crystal Developer and set the layout to be "Down then Across". It seems like Crystal Enterprise is losing this setting or overriding my setting of "Across then Down" for whatever reason.

  • IR - Column with leading Zeros issue

    Hello,
    I've got an IR report which includes as "default report settings" 1 column with leading 0s. In order to export to Excel that column as text rather than as a numeric I followed a workaround proposed before in this forum (excel copy drops leading zeros
    In essence this workaround is to create an identifical column but in "excel text format" and display the columns depending on the request value: INSTR(NVL(:REQUEST,'YABBADABBADO'),'CSV') <> 0 for example.
    This works just fine for the default report.
    The problem arise when a user creates his own customise report that includes the mentioned column and saves it as a named report. Here, when the results are exported to excel the "excel" column does not appear.
    In fact, just hiding one of the displayed columns produces the same undesired result.
    I would appreciate any comments or suggestions.
    Many thanks
    Edited by: Javier Gil on Jul 20, 2010 7:52 AM

    I have found a better method. In your IR query:
    SELECT LPAD(v.vendor, 7, ' ') vendor,
    /*Just LPAD to a length of the column defined in the database table or to 7, whichever is greater. */
    FROM v, r
    WHERE v.VENDOR = r.VENDOR
    AND date_rcv <= to_date(:P150_CUTOFF,'yyyy/mm/dd')
    AND inv_nbr = ' '
    AND to_stores <> 'T'
    AND (V.VENDOR = RPAD(:P150_VENDOR,10,' ') OR :P150_VENDOR = 'ALL')
    When you download to Excel by Download/XLS (Request=XLS), it preserves the leading zeros.
    In the case of dates, you should LPAD 10 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YY'), 10, ' ') date_rcv,
    I haven’t tried it yet but I think in the case of ‘MM/DD/YYYY’, you should LPAD 12 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YYYY'), 12, ' ') date_rcv,
    Drawbacks of this method:
    Since the string has leading white spaces, you cannot use the filter for the ‘=’ comparison operator. Even filtering using leading white spaces will not return anything. You must use the LIKE and NOT LIKE operator instead.
    Advantages of this method over the original one I posted yesterday:
    1)     You do not have to create another column for download, just one column will suffice.
    2)     Even though the query has leading white spaces, they will not display in the IR region.
    Edited by: richardlee on Aug 5, 2010 11:10 AM
    Edited by: richardlee on Aug 5, 2010 11:16 AM

Maybe you are looking for

  • BI-IP Authorizations: Accessing own Cost Center only

    Hi, We are currently implementing BI-IP in our company. We have created the ready-input templates and we are prepared for roll-out. There is still one concern though which I haven't resolved. I am currently looking for an AUTHORIZATION that will let

  • Query Count of rows

    Hi Everyone, I have a table Table1 Table1: ID, Name, Sales, Time Sample data: 1, Loo, Y, 20-JUL-09 01.20.17.000000000 PM 2, Rey, Y, 20-JUL-09 01.20.17.000000000 PM 1, Loo, Y, 20-JUL-09 01.20.17.000000000 PM 1, Loo, Y, 20-JUL-09 01.20.17.000000000 PM

  • Cue Points

    I have a flv which im loading in from another location (ie its not embeded), and Im trying to create a loop point using cue points. I have 3 cue points: begining, loop_point, end Basically when the playhead reaches the "end" cuepoint, I want it to ju

  • How do I adjust the time period before a link times out? It is too short now.

    websites are timing out too quickly. I would like to adjust the timeout setting to a longer period. I know you can do this in Internet Explorer.

  • How do i do a mail merge for labels

    I would like to create labels in a Pages document using a Numbers document for the data.  I have it all set up, but upon completing the merge, I get an entire page of the same label (same fields), the next page of labels contains 30 copies of the 2nd