VERY URGENT:Query based on data passed by Button event

Hiiiiiiiiiiii friends...
I am new to fwk, and its very hard time to me,please help..
I have 2 pages. On first page I am going to enter Pid, then by selecting FIND button I want to execute query for 2nd page for that Pid and get details.
I have 2 COs.
For calling page it is as....
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("FIND") != null)
String PerNum = pageContext.getParameter("PersonId");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
Serializable[] parameters = { PerNum };
am.invokeMethod("initDetails",parameters);
pageContext.setForwardURL("OA.jsp?page=/NEW_PAGE/oracle/apps/PER/person/webui/detailsPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
and for 2nd CO i have..
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
String PerNum = pageContext.getParameter("PersonId");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
Serializable[] parameters = { PerNum };
am.invokeMethod("initDetails",parameters);
and initquery and initDetails methods are written on VOIMPL and AMIMPL classes respectivly...
I have used only one VO.
but i unable to pass Pid to second page so that I get result.
Please help me.....
Thanks
Message was edited by:
Madhav_gharge
Message was edited by:
Madhav_gharge

The parameters are not correct in your setForwardURL method. Use either
public void setForwardURL(String functionName,
byte menuContextAction,
String menuName,
com.sun.java.util.collections.HashMap parameters,
boolean retainAM,
String addBreadCrumb,
byte messagingLevel)
or
public void setForwardURL(String url,
String functionName,
byte menuContextAction,
String menuName,
com.sun.java.util.collections.HashMap parameters,
boolean retainAM,
String addBreadCrumb,
byte messagingLevel)
--Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Query based on date partition

    Hi,
    I am trying to output only a successful job during the past 24 hrs of each day. If there is job that has an outcome of a success and a failure within the last
    24 hrs for each day, I want to only output the successful one. If there are no success for the same job, I will output the last attempted failed job.
    Here are my columns:
    current output:
    JOB_ID     JOBDATE               GROUP     PATH          OUTCOME          FAILED     LEVEL     ASSET
    3400908     7/27/2012 10:01:18 AM     polA     target1          Success          0     incr     clone1
    3400907     7/27/2012 10:01:09 AM     polA     target1          Failed          0     incr     clone1
    3389180     7/23/2012 10:01:14 AM     polA     target1          Failed          1     incr     clone1
    3374713     7/23/2012 10:01:03 AM     polA     target1          Success          0     incr     clone1
    3374712     7/22/2012 11:24:32 AM     polA     target1          Success          0     Full     clone1
    3367074     7/22/2012 11:24:00 AM     polA     target1          Failed          1     Full     clone1
    3167074     7/21/2012 10:01:13 AM     polA     target1          Success          0     incr     clone1
    336074     7/21/2012 10:01:08 AM     polA     target1          Success          0     incr     clone1
    desired output:
    JOB_ID     JOBDATE               GROUP     PATH          OUTCOME          FAILED     LEVEL     ASSET
    3400908     7/27/2012 10:01:18 AM     polA     target1          Success          0     incr     clone1
    3374713     7/23/2012 10:01:03 AM     polA     target1          Success          0     incr     clone1
    3374712     7/22/2012 11:24:32 AM     polA     target1          Success          0     Full     clone1
    3167074     7/21/2012 10:01:13 AM     polA     target1          Success          0     incr     clone1
    Here is a code I am trying to use without success:
    select *
    from
       (selectjob_id, jobdate, group, path, outcome, Failed, level, asset,
              ROW_NUMBER() OVER(PARTITION BY group, path, asset ORDER BY jobdate desc) as rn
                   from job_table where jobdate between trunc(jobdate) and trunc(jobdate) -1 )
       where rn = 1
       order by jobdate desc;Thanks,
    -Abe

    Hi, Abe,
    You're on the right track, using ROW_NUMBER to assign numbers, and picking only #1 in the main query. The main thing you're missing is the PARTITION BY clause.
    You want to assign a #1 for each distinct combination of group_id, path, asset and calendar day , right?
    Then you need to PARTITION BY group_id, path, asset and calendar day . I think you realized that when you named this thread "Query Based *on date partition* ".
    The next thing is the analytic ORDER BY clause. To see which row in each partition gets assigned #1, you need to order the rows by outcome ('Success' first, then 'Failed'), and after that, by jobdate (latest jobdate first, which is DESCending order).
    If so, this is what you want:
    WITH     got_r_num     AS
         SELECT  j.*     -- or list columns wanted
         ,     ROW_NUMBER () OVER ( PARTITION BY  group_id     -- GROUP is not a good column name
                                   ,                    path
                             ,             asset
                             ,             TRUNC (jobdate)
                                   ORDER BY          CASE  outcome
                                                 WHEN  'Succcess'
                                         THEN  1
                                         ELSE  2
                                             END 
                             ,             jobdate     DESC
                           )      AS r_num
         FROM    job_table  j
         WHERE     outcome     IN ('Success', 'Failed')
    --     AND     ...     -- Any other filtering, if needed
    SELECT     *       -- or list all columns except r_num
    FROM     got_r_num
    WHERE     r_num     = 1
    ;If you'd care to post CREATE TABLE and INSERT statements for the sample data, then I could test it.
    It looks like you posted multiple copies of this thread.  I'll bet that's not your fault; this site can cause that.  Even though it's not your fault, please mark all the duplicate versions of this thread as "Answered" right away, and continue in this thread if necessary.
    Edited by: Frank Kulash on Jul 28, 2012 11:47 PM
    This site is flakier than I thought! I did see at least 3 copies of this same thread earlier, but I don't see them now.

  • Select Query Based on date condition

    Hi ,
    Is it Possible.
    i want to run select query based on date condition.
    Eg...
    if the date between 01-jan-01 and 01-jan-05 then
    select * from table1;
    if the date between 02-jan-05 and 01-jan-08 then
    select * from table2;
    Becaz i have data in 2 diffrent tables , based on the date condition i wnt to run the select statement to diffrent tables.
    i dont want plsql here Just SQL needed.
    thanks,
    -R
    Edited by: infant_raj on May 5, 2009 11:48 PM

    Helo Kanish,
    this is not the one i was asking..
    wht i mean was .
    i use bind variable to get date while running the select statement , once i get the date then i want to choose any one of the table to run select query.
    EG..
    select col1,col2 from table1 where date between only if 01-jan-01 and 01-jan-05;
    select col1,col2 from table2 where date between only if 02-jan-05 and 01-jan-08;
    Run any one of the two . not all
    thanks,
    _raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Auto-expire from query based on date

    I have some records in my MySQL db that contain dates for upcoming events.. I need a way to query upcoming events and expire them from the query once the date passes without necessarily deleting them from the database. (I'm publishing the next 5 upcoming events to the homepage via 'LIMIT 5').
    Is there an easy way to do this within a MySQL db query? This section of the site (both insert record, display, current query, etc) is all created with ADDT.
    Please let me know!
    Thanks!

    Hi Nathan,
    I reckon you´d just need to display those events which come later than what MySQL calls "CURDATE()"
    (aka "current date") -- so a query like...
    SELECT * FROM tablename WHERE CURDATE() > 'datefield'
    ...should filter the past dates. Works ??
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Its very urgent:how to insert data into database tables

    Hi All,
    I am very new to oaf.
    I have one requirement data insert into database tables.
    here createPG having data that data insert into one custom table.
    but i dont know how to insert data into database tables.
    i wrote the code in am,co as follows.
    in am i wrote the code:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in createPG processrequest co:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.NewoperationManagerLogic();
    process form request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    please help with an example(sample code).
    its very urgent.
    thanks in advance
    Seshu
    Edited by: its urgent on Dec 25, 2011 9:31 PM

    Hi ,
    1.)You must have to create a EO based on custom table and then VO based on this EO eventually to save the values in DB
    2.) the row.setNewRowState(Row.STATUS_INITIALIZED); is used to set the the status of row as inialized ,this is must required.
    3.) When u will create the VO based on EO the viewattributes will be created in VO which will be assigned to the fields to take care the db handling .
    You must go thtough the lab excercise shipped with you Jdeveloper ,there is a example of Create Employee page ,that will solve your number of doubts.
    Thanks
    Pratap

  • VERY URGENT!! How to Pass a "% " symbol from form to Report

    Hi
    I am using oracle 10g and passing a symbol "%" as a parameter to the report from a form. But it shows error as follows:
    REP-52006: Failed to decode the specified URL PARAMETER1=%.
    But it is working when it runs in the Report directly.
    Then Why we can't pass the symbol "%" to the report from form.
    Please reply me as soon as possible. IT IS VERY URGENT !!

    Hi,
    Try using a lexical parameter(&parm_1) for a string of values or a bind parameter(:parm_1) for a single value
    Thanks,
    Kimosabe

  • Its very urgent:How to insert data one table to another table

    Hi all,
    i am very new to oaf.
    i have employee_number(per_all_people_f) lov is there.once select the employee number and click on the submit button
    what ever select the employee number it ll move to new_operation_manager in custom table.
    plz help me how to move.
    its very urgent.
    Thanks
    Latha.
    Edited by: Latha on Dec 21, 2011 9:33 PM

    Hi Gyan,
    Sorry, i will not repate.how to close the thread.
    Gyan i have no knowledge on this issue.
    plz help me.and where to mention,data is which table to insert.
    plz send one sample code.
    its very urgent gyan.
    i wrote the am,co codes
    in am:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();----> here which vo take
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in Co processrequest:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.invokeMethod("NewoperationManagerLogic");
    in co processform request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    throw new OAException("Records Saved Sucessfully",OAException.INFORMATION);
    thanks
    latha
    Edited by: Latha on Dec 22, 2011 1:26 AM

  • Query based on date

    Have you guys ever tried to write a query based on CMP?
    The EJB QL is:
    select object(a) from ActionItems as a where a.duedate = ?1
    When I deployed it to OC4J, I got the following error:
    Error compiling D:\oc4j903\j2ee\home\applications\biogen/biogen.jar: Error trans
    lating EJBQL: Invalid type for expression (a.dueDate = ?1)
    EJB QL statement : 'select object(a) from ActionItems as a where a.dueDate = ?1'
    EJB QL method : public abstract java.util.Collection ActionItemsLocalHome.findByDueDate(java.sql.Date) throws javax.ejb.FinderException
    Auto-deploying file:/D:/oc4j903/j2ee/home/applications/biogen/biogen/ (Assembly
    had been updated)...
    So, any query that is based on date will not work for OC4J, is this a bug or what?
    Thanks for the reply.
    Jingzhi

    I would post this question (and your date range question) to the J2EE group. More J2EE/EJB specific questions are answered there.
    To my understanding the standard ejb2.0 specification is weak in date comparisons for queries. I believe you need to add your date queries to your application server specific orion-ejb-jar.xml file. I'm not sure of how, I would post that question to the J2EE forum, or look it up in the 9ias documentation.
    -Mark

  • Very urgent help needed- Error while passing XML document to Oracle stored

    Hi !
    I have been struggling a lot to call Oracle 9i stored procedure passing Stringbuilder object type from ASP.NET
    I am using Visual Studio 2008 Professional, OS: Windows XP and Oracle: 9.2.0.1.0
    Following is the procedure:
    CREATE or REPLACE PROCEDURE loadCompanyInfo (clobxml IN clob) IS
    -- Declare a CLOB variable
    ciXML clob;
    BEGIN
    -- Store the Purchase Order XML in the CLOB variable
    ciXML := clobxml;
    -- Insert the Purchase Order XML into an XMLType column
    INSERT INTO companyinfotbl (companyinfo) VALUES (XMLTYPE(ciXML));
    commit;
    --Handle the exceptions
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20101, 'Exception occurred in loadCompanyInfo procedure :'||SQLERRM);
    END loadCompanyInfo ;
    And following is the ASP.net code:
    StringBuilder b = new StringBuilder();
    b.Append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
    b.Append("<item>");
    b.Append("<price>500</price>");
    b.Append("<description>some item</description>");
    b.Append("<quantity>5</quantity>");
    b.Append("</item>");
    //Here you'll have the Xml as a string
    string myXmlString1 = b.ToString();
    //string result;
    using (OracleConnection objConn = new OracleConnection("Data Source=testdb; User ID=testuser; Password=pwd1"))
    OracleCommand objCmd = new OracleCommand();
    objCmd.Connection = objConn;
    objCmd.CommandText = "loadCompanyInfo";
    objCmd.CommandType = CommandType.StoredProcedure;
    //OracleParameter pmyXmlString1 = new OracleParameter("pmyXmlString1", new OracleString(myXmlString1));
    objCmd.Parameters.Add("myXmlString1", OracleType.clob);
    objCmd.Parameters.Add(myXmlString1).Direction = ParameterDirection.Input;
    //objCmd.Parameters.Add("result", OracleType.VarChar).Direction = ParameterDirection.Output;
    try
    objConn.Open();
    objCmd.ExecuteNonQuery();
    catch (Exception ex)
    Label1.Text = "Exception: {0}" + ex.ToString();
    objConn.Close();
    When I am trying to execute it, I am getting the following error:
    Exception: {0}System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'LOADCOMPANYINFO' ORA-06550: line 1, column 7: PL/SQL: Statement ignored at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQuery() at Default.Button1Click(Object sender, EventArgs e)
    I understand from this that the .net type is not the correct one, but I am not sure how to correct it. I could not find any proper example in any documentation that I came across. Most of the examples give information on how to read but not how to insert XML into Oracle table by calling Stored Procedure.
    Can you please help me to solve this problem? I hope that you can help solve this.
    Also, can you please give me an example of passing XML document XMLdocument to Oracle Stored procedure.
    In both the cases, if you can provide the working code then it would be of great help.
    Thanks,

    Hi ,
    Additional to the Above error details my BPEL code looks like this:
    <process name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    <partnerLinks>
    <partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
    </partnerLinks>
    <variables>
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
    <invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>
    </process>
    Kindly help if anyone has faced this Issue before.
    Regards,
    Rakshitha

  • Query based on Dates

    Hi,
    There are two :p1_start and :p2_end bind variable
    If the above two bind variables are null it must show all the data.
    if two bind variables are not null then it will show the dates between two date pickers.
    select actual_end,status from schedule
    where
    actual_end is between to_date(:p1_start) and to_date(:p1_end)
    Please suggest me in modifying the query.
    Thanks
    Sudhir

    I disagree with using notional start and end dates and agree with Roel that the column should be equated to itself instead.
    However using NVL may negate the index on the column, so I would suggest this instead (logically its the same as Roel's suggestion though)...
    SELECT *
    FROM   my_table
    WHERE  date_col BETWEEN CASE WHEN TO_DATE(:P_STARTDATE) IS NULL
                                 THEN  date_col
                                 ELSE TO_DATE(:P_STARTDATE)
                            END
                    AND
                            CASE WHEN TO_DATE(:P_ENDDATE) IS NULL
                                 THEN  date_col
                                 ELSE TO_DATE(:P_ENDDATE)
                            ENDCheers
    Ben

  • Query Based on Date & Time Range

    Hello Users,
    There is a requirement to display weekly report from saturday 8:00 AM to previous saturday 08:00 AM.
    I have a table "Downtime"
    IPADDRESS       First Occurrence                   Last Occurrence           Downtime
    172.29.10.12    31-JUL-10 08:12:50             01-AUG-10 09:00:00      1
    172.29.11.54    01-AUG-10 11:12:00            01-AUG-10 01:10:00      3
    172.29.58.7      07-AUG-10 04:10:00            07-AUG-10 05:00:00      2I will not have problem when I run the report on saturday as I can give condition as sysdate - 7.
    First problem is how will I default to 8 AM.
    Second if the report is run on sunday or in between before next saturdya I have to query the records only from satuday 8 AM to previous saturday 8 AM.
    Can anyone please help me on this?
    Thanks.
    Ravi.

    Hi,
    hoek wrote:
    That's a great hint, Solomon, thanks.
    I always end up getting frustrated because trunc on a date returns a NULL for 'midnight'....and the ability to perform date arithmetic is gone all of a sudden. Why isn't Oracle just resetting to '00:00:00' when truncating a date, I wonder?I must not understand what you're asking.
    It sounds as if you're saying that TRUNC (dt) sometimes returns something that is NULL (or somehow partially NULL), but I'm sure you don't really think that.
    For other readers who may be wondering:
    TRUNC (dt), where dt is a DATE (and not NULL) , always returns a DATE, and DATEs always have a time. Either the whole DATE is NULL or none of it is; you can't have a year-month-day in a DATE column and not have a time, or have a NULL time.
    TRUNC(dt, x) may return a DATE where the time is not midnight, but only if x is a format string like 'MI' that specifies an interval less than a day. When x indicates a longer interval (e,g, 'IW'), or when x is omitted, the time is always midnight. In any event, you can do date arithmetic on the results.
    I'm sure you understand this, but your question makes it sound like you don't.
    This should illustrate my point:
    -- generating hours, starting 14 days ago:
    with t as (
    select trunc(sysdate-14)+ level/24-1 dt
    from   dual
    connect by level <= 24*14
    -- querying generated data:
    select dt
    --,      trunc(dt,'iw') - 5/3  -- great workaround, but why can't we just work with 00:00:00 for the time component?
    from   t;
    -- generating hours, starting 14 days ago:
    with t as (
    select trunc(sysdate-14)+ level/24-1 dt
    from   dual
    connect by level <= 24*14
    -- querying data between saturday and previous saturday
    -- from the same resultset and 'it doesn't work'
    select dt
    from   t
    where  dt between trunc(dt-7)+8/24 and trunc(sysdate)+8/24;
    Is this a parody of a poorly written question?
    Are you trying to make the point that no one should ever say "it doesn't work" without explaining exactly what doesn't work, and what the expected output is?
    I get the same 336 rows when I run either of the queries above.
    As you've often said, posters should always show exactly what results they want.

  • Very urgent: query regarding sending mail frm infopackage

    Hi all,
              At InfoPackage level at menubar in systems option--->short message option is exists.
           Can we use this option to send mail to client that infopackage has been successful or failure.
            Please send me more detaily how can we send mail to any receipent.I am unable to work on this option please help me out.
    Thanks & Regards,
    Praveena

    Hi praveena,
    if you want to send messages when the infopackage is successful, this can be done in the process chains.
    Steps are as follows:
    create process chain to include the Infopackage (IP) for which you want to send
       message
    Right click on the IP , create message. pop up will come asking you when the 
       message should be sent seolect when it is successful
    Create variant for sending message and maintain the receipient list (email IDs)
    with this you can send messages.
    I hope this will help you.
    Vijay.

  • Query output based on date - Oracle 8i

    I am trying to write a very simple query to output data based
    on date ranges, but I keep encountering an error.
    When I do this statement:
    select * from my.table
    where startdate > '2008-01-01'
    I get this error:
    [ODBC][Ora]ORA-01861: literal does not match format string
    When I format the select statement this way:
    select * from my.table
    where startdate > #2008-01-01#
    i get this error:
    [ODBC][Ora]ORA-00932: inconsistent datatypes: expected DATE
    got NUMBER
    Currently using CF8, and what I believe is Oracle 8i. I have
    tried formatting this data in many other ways, but can't get it to
    work. I know that when I query the database via access, it has no
    problem returning results with the SQL date formatted like
    #01/01/2008#

    You can use the Oracle to_date() function to convert your
    string to a date/time object:
    select * from my.table
    where startdate > to_date('2008-01-01', 'YYYY-MM-DD')
    Or, since you are using an ODBC connection to Oracle, you can
    try using the ColdFusion CreateODBCDate() function:
    select * from my.table
    where startdate > #CreateODBCDate("2008-01-01")#
    Or, as already suggested, use cfqueryparam with the
    appropriate CFSQLType, such as
    CF_SQL_TIMESTAMP instead of CF_SQL_INTEGER like you are
    attempting to do.
    You can't use a "string" date value against a date/time
    column in an Oracle query, as it won't perform an implicit type
    conversion.
    Phil

  • Query based on a date range

    I want to query based on a date range. I wrote the following EJB QL:
    "select object(a) from ActionItems as a where a.dueDate
    between ?1 and ?2"
    But when I deployed the application to Oracle's EJB server, I got the following error:
    Auto-deploying biogen.jar (No previous deployment found)... Invalid type for expression (a.dueDate BETWEEN ?1 AND ?2)
    EJB QL statement : 'select object(a) from ActionItems as a where a.dueDate between ?1 and ?2'
    EJB QL method : public abstract java.util.Collection ActionItemsLocalHome.findByDueDateRange(java.sql.Date,java.sql.Date) throws javax.ejb.FinderException
    at com.sun.ejb.ejbql.parser.EjbQLParser.parse EjbQLParser.java:218)
    at com.sun.ejb.ejbql.EjbQLDriver.parse(EjbQLDriver.java:86)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQLForEjbQLQueries(SQLGenerator.java:704)
    It works fine for a number range, but does not work for a date range.
    Any one has an idea on how to write a correct EJB QL for a query based on date range?
    Thanks.
    Jingzhi

    Re-posted. Please help!

  • MDX calculation based on date logic for the Jan 1 of current year through the 15th of the previous month

    Hello, 
    We need some help with an SSAS MDX query based on date logic. One of the problems is that I don't have access to the Cube but have been given a query example with the logic needed for the calculation. Here's the scenario; 
    The ETL process will run on the first Tuesday after the 15<sup>th</sup> of a given month. The Analysis Cube data queried should include the current year up to the end of the previous month. For example, on May 19<sup>th</sup>
    (the first Tuesday on or after the 15th) the query should include data from January 1<sup>st</sup> through April 30<sup>th</sup>.
    The 15<sup>th</sup> of the month is not part of the query, it is a factor in when the query is run. The query will always be in terms of complete months.
    SELECT
                    NON EMPTY { [Measures].[Revenue Amount],
                    [Measures].[Utilization],
                    [Measures].[AVG Revenue Rate],
                    [Measures].[Actual Hours] }
    ON
                    COLUMNS,
                    NON EMPTY { ([dimConsultant].[User Id TT].[User Id TT].ALLMEMBERS * [dimConsultant].[Full Name].[Full Name].ALLMEMBERS * [dimConsultant].[Employee
    Type].[Employee Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
                    MEMBER_UNIQUE_NAME
    ON
                    ROWS
    FROM
                    ( SELECT
    ( { [dimDate].[Week Date].[1/4/2015], [dimDate].[Week Date].[1/11/2015], [dimDate].[Week Date].[1/18/2015], [dimDate].[Week Date].[1/25/2015], [dimDate].[Week Date].[2/1/2015] } )
                    ON
                                    COLUMNS
                    FROM
                                    ( SELECT
    ( { [dimIsBillable].[Is Billable].&[True] } )
                                    ON
    COLUMNS
                                    FROM
    [SSASRBA]
    WHERE
                    ( [dimIsBillable].[Is Billable].&[True], [dimDate].[Week Date].CurrentMember ) CELL PROPERTIES VALUE,
                    BACK_COLOR,
                    FORE_COLOR,
                    FORMATTED_VALUE,
                    FORMAT_STRING,
                    FONT_NAME,
                    FONT_SIZE,
                    FONT_FLAGS

    Hi Hans,
    Thank you for your question.  
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.  
    Thank you for your understanding and support. 
    Regards,
    Simon Hou
    TechNet Community Support

Maybe you are looking for

  • Screen goes black constantly, okay with Windows

    My mid-2010 21.5" iMac has been having issues for a while now.  The screen goes black randomly.  This happens anywhere from once a week to once every two seconds for days on end.  I've done plenty of research and seen similar problems but no real sol

  • Setting up a Printer over Wirless Network

    I have a MacBook Pro and a Old G4 Mirror Door connected to a Linksys Wirless Router in my home. I only have one phone jack in my house and its in the kitchen.:( So I put an Airport card in the G4 so I could have my computer in my office. I have a hp

  • Credit check issue

    Dear Gurus, Greetings. We are successfully running Credit management in our Client's place. Today, for a couple of customers at one Location, there was no Credit check. Though the Customer had some Debit balance, system allowed the end user to create

  • Macbook air keeps reverting to waves default desktop picture

    so I have done everything to try and get this desktop situation figured out. I've tried deleting things from the library, tried rebooting, etc. Also, in my library there is no file named "desktop.plist." theres only the system preferences. Neverthele

  • All faces tagged?

    I used keywords for 'faces & places' in the past. But now that faces & places are supported in iPhoto I'll of course want to switch to using the built in features. So I've got an entire library to 'tag'. Which is fine. My problem is .... how do I kno