Query Records between thwo dates in a Auto Customization Criteria

Hello all
Lets say I have following attributes in my VO
HeaderId
DocNo
TransDate
OrgId
DocStatus
DocType
I have following field in my CustomSimpleSearch (Auto Customization Criteria)
DocStatus
DocType
My Results table populated fine according to above two fields. But i want to add
"StartDate" and "EndDate" in my CustomSimpleSearch which should be matched
with "TransDate" so that query becomes
TransDate between "StartDate" and "EndDate". I mean i want to populate my records also on TransDate basis
Kindly provide me a step by step solution or any tutorial which can help me as I am very new to OAF.
Regards

What Ram said is the only option if you want to stick with the Query region. Otherwise you can look to define your own query page and the corresponding logic which will be more troublesome just to achieve your 1 requirement.
--Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Query for between two dates.

    Hi,
    I've a column of date, and I want to select the records between two dates, the output of this columns is: 08/19/2003 2:11:00 AM
    My query is:
    SELECT DTM FROM ITEM
    WHERE DTM BETWEEN '07/01/2012' AND '07/15/2012'
    Please help.
    Thanks,

    >
    I've a column of date, and I want to select the records between two dates, the output of this columns is: 08/19/2003 2:11:00 AM
    My query is:
    SELECT DTM FROM ITEM
    WHERE DTM BETWEEN '07/01/2012' AND '07/15/2012'
    Please help.
    >
    Help with what? You didn't ask a question or indicate if you are having a problem of some sort.
    Did you need to know how to use TO_DATE instead of literals in the WHERE clause?
    SELECT DTM FROM ITEM
    WHERE DTM BETWEEN TO_DATE('07/01/2012', 'MM/DD/YYYY') AND TO_DATE('07/15/2012', 'MM/DD/YYYY');

  • What is the condition to retreive the records between two dates

    Hi,
         I will give START_DATE and END_DATE for a program to retreive the records between these two dates.
        how to write the select query to retreive the records between these two dates.?
        suppose i want to retreive NACHN, VORNA from PA0002.
    then how to write query to retreive nachn, vorna between START_DATE and END_DATE.

    hi,
    Types:begin of ty_pa0002,
              NACHN type PAD_NACHN,
              vorna  type PAD_VORNA,
              end of ty_pa0002.
    Data:it_pa0002 type table of ty_pa0002.
    Parameters:start_date type begda,
                      end_date type  ENDDA .
    select NACHN
              vorna
    from pa0002
    into table it_pa0002
    where begda = start_date
    and  ENDDA = end date.
    Regards,
    Shiva.

  • Query records using a date DD-MON-YYYY in Forms 6i and 10g

    In Forms 6i, I can query records by entering >20-dec-2006 in a date field which has length of 12 with a date format mask DD-MON-YYYY in date item property. Once this form is converted to 10g, I can only enter >2-dec-2006 for querying. If trying to enter the >20-dec-2006, then, it becomes >20-dec-200 and have no record found. Although I have the date length increased to 20, the result stays the same: can't enter 2 digits for day.
    Thanks for your help in advance.

    Appreciate your help. The date field has a format mask of DD-MON-YYYY. By entering >2-dec-2005 it will automatically be displayed as >2-DEC-2005 in Forms 6i or 10g. Also, the query property has case insensitive checked as Yes. The problem is with 10g, I can not enter anything at the 12th position. I can enter the date up to the 11th position >20-dec-200. In Forms 6i, this is not a problem. Thanks.

  • JHeadstart query operator between with date field

    Hallo,
    I am using JDeveloper 10.1.1.0.2 and JHeadstart 11 Technical Release 1.
    In my Application Definition Editor I use the Query Operator 'between' on a data-field. In my Application I can see a 'from' and 'to' date field.
    Testcase:
    In my table I have 3 dates: 1-1-2009, 17-1-2009 and 18-1-2009.
    If I use:
    Date from: 1-1-2009 and Date to: 18-1-2009 in my Application I expect to see only 2 rows (1-1-2009 and 17-1-2009). But I can see 3 rows.
    So my question is: what does 'to' mean in the JHeadstart generator? Does it include the date you fill in with the 'to' field?

    I can change the text in GeneratorText_nl.properties, but this does not completely solve my problem.
    I use a DateTimeField in my Application and if I use 'Date to' in my search criteria it seems that the Time of my Date-field is being ignored!
    Testcase:
    'Date to' in searchcriteria = 13-10-2009 *12:10:00* also gives results with the same date but time greater than 12:10:00, for example 13-10-2009 *16:10:00*.

  • Select Records between Begin Date/Time and End Date/Time

    Hi, I need to select records from table GLPCA where the CPUDT and CPUTM are between a START DATE/TIME and END DATE/TIME. 
    I have the below logic from an SAP Solution, but it doesn't seem to be working right in my opinion.  It is picking up records earlier than the date ranges.  Can anyone tell me how I might be able to accomplish this?  I'm hoping this is an easy one for the ABAPPERs... 
    Thanks,
    START DATE 20091022
    START TIME 125736
    END DATE 20091022
    END TIME 135044
    CPUDT 20091022
    CPUTM 100257
          SELECT * FROM GLPCA
             WHERE ( CPUDT >= STARTDATE AND ( CPUTM >= STARTTIME OR ( CPUDT <= ENDDATE AND CPUTM <= ENDTIME ) ) ).

    Thank you all!  I ended up using the following:
    SELECT * FROM GLPCA
              WHERE RYEAR IN L_R_RYEAR
                AND ( ( CPUDT = STARTDATE AND CPUTM >= STARTTIME ) OR CPUDT > STARTDATE )
                AND ( ( CPUDT = ENDDATE   AND CPUTM <= ENDTIME )   OR CPUDT < ENDDATE ).
    This child was born from the following thread that was found:
    update date and time of client record

  • 9i Forms Challenge! Query records from a data block based on this view

    According to Oracle Support, it is not unusual that complicated views like the one shown below fail to work in Forms. They recommend that I "try using a When-validate trigger" to solve the problem. I would be grateful if someone could show me how. It would also be helpful if someone could explain why Forms would have a problem querying such a view in the first place.
    Thanks very much!
    CREATE TABLE t (
    id NUMBER,
    property VARCHAR2(2),
    val NUMBER
    INSERT INTO t VALUES ( 1, 'A', 10 );
    INSERT INTO t VALUES ( 1, 'B', 11 );
    INSERT INTO t VALUES ( 2, 'A', 12 );
    INSERT INTO t VALUES ( 2, 'B', 13 );
    INSERT INTO t VALUES ( 3, 'A', 14 );
    || This view produces an ORA-01403 no data found error
    || in Oracle Forms 9i.
    CREATE OR REPLACE VIEW t_v
    AS
    SELECT id,
    MAX( DECODE( property, 'A', val, NULL ) ) AS a_val,
    MAX( DECODE( property, 'B', val, NULL ) ) AS b_val
    FROM t
    GROUP BY id;

    Steve,
    Your suggestion to put the view definition into the tablename field of the forms properties sheet was fruitful.
    Instead of the ORA-01403 error (No data found), I get ORA-24347 (Warning of a NULL column in an aggregate function). This error led me to discover bug 2457121, filed 11-Jul-2002, through Metalink. This bug is reported to only be a problem in Forms 9.0.2.7. It is reported to be fixed in Forms version 9.0.2.12.
    Thanks for your interest and help.
    - Doug

  • Query using Between for date range

    Hi,
    I need to list a date range of registration.. i entered
    4/12/2007 (as value for form.regstart) and 7/12/2007 (as value for
    form.regend)..
    WHERE dateregistered BETWEEN #CreateODBCDate(form.regstart)#
    AND #CreateODBCDate(form.regend)#
    the result that i got was only from 4/12/2007 to 6/7/2007..
    however when i run the same coding at mysql.. it works
    perfectly..
    any idea?

    Turn on debugging and see what dates show up in the sql that
    went to your db. Cold Fusion might be confused by your date format.
    I certainly am.

  • How to make search between two dates accept null not obligatory search proplem

    Hi guys when i search record between two dates it works ok success but you must enter date from and dateto first to  to make search
    i will show what i need from this example
    I need to search dynamic by 4 textbox
    1-datefrom
    2-dateto
    3-EmployeeNo
    4-EmployeeName
    but search i need must be dynamic meaning
    if i enter employee no only give me employee no found in database
    if i enter employee name give me employees found with this name using like
    if i enter all 4 text box null and enter button search get all data
    but i have proplem in this query when i need to search by click search button
    i must write date from and date to firstly then write employee no or employee name if i need to search
    so that i need to search by employee no alone or employee name alone without using date from and date to
    And if i search without using datefrom and dateto it give me message error 'string wasnot recognized as valid datetime"
    my stored procedure and code as following :
    ALTER proc [dbo].[CollectsearchData]
    @StartDate datetime,
    @EndDate datetime,
    @EmployeeID  NVARCHAR(50),
    @EmployeeName  nvarchar(50)
    as
    Begin
    Declare @SQLQuery as nvarchar(2000)
    SET @SQLQuery ='SELECT * from ViewEmployeeTest Where (1=1)'
    If (@StartDate is not NULL)
    Set @SQLQuery = @SQLQuery + ' And (joindate >= '''+ Cast(@StartDate as varchar(100))+''')'
    If (@EndDate is not NULL)
    Set @SQLQuery = @SQLQuery + ' And (joindate <= '''+ Cast(@EndDate as varchar(100))+''')' 
    If @EmployeeID <>''
    Set @SQLQuery = @SQLQuery + 'And (EmployeeID = '+ @EmployeeID+') '
    If @EmployeeName Is Not Null
    Set @SQLQuery = @SQLQuery + ' AND (DriverName LIKE
    ''%'+@EmployeeName+'%'') '
    Print @sqlQuery
    Exec (@SQLQuery) 
    End
    Function using
    public DataTable SearchDataA(string ConnectionString,string EmployeeNo,string EmployeeName, DateTime StartDate, DateTime EndDate)
    SqlConnection con = new SqlConnection(ConnectionString);
    SqlCommand cmd = new SqlCommand();
    cmd.Connection = con;
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.CommandText = "CollectsearchData";//work
    cmd.Parameters.Add("@StartDate", SqlDbType.DateTime);
    cmd.Parameters.Add("@EndDate", SqlDbType.DateTime);
    cmd.Parameters.Add("@EmployeeID", SqlDbType.NVarChar, 50);
    cmd.Parameters.Add("@EmployeeName", SqlDbType.NVarChar, 50);
    cmd.Parameters["@StartDate"].Value = StartDate;
    cmd.Parameters["@EndDate"].Value = EndDate;
    cmd.Parameters["@EmployeeID"].Value = EmployeeNo;
    cmd.Parameters["@EmployeeName"].Value = EmployeeName;
    SqlDataAdapter da = new SqlDataAdapter();
    da.SelectCommand = cmd;
    DataSet ds = new DataSet();
    da.Fill(ds);
    DataTable dt = ds.Tables[0];
    return dt;
    interface button search
     try
    CultureInfo ukCulture = new CultureInfo("en-GB");             
    FleetManagment.Fleet fleet = new FleetManagment.Fleet();
    DataTable Table = fleet.SearchDataA("Data Source=" + value1 + ";Initial Catalog=" + value2 + ";User ID=" + value3 + ";Password=" + value4 + "",textBox3.Text,textBox4.Text, DateTime.Parse(textBox1.Text,
    ukCulture.DateTimeFormat), Convert.ToDateTime(textBox2.Text, ukCulture.DateTimeFormat));
    dataGridView1.DataSource = Table;
    dataGridView1.Refresh();
    catch (Exception ex)
    MessageBox.Show(ex + "error");

    Yes, the below code should not be passed any value: (I am not sure of the syntax in .NET,Sorry) 
    --If startdate len is 0 - do not assign this value
    cmd.Parameters["@StartDate"].Value = StartDate;
    --If endate len is 0 - do not assign this value
    cmd.Parameters["@EndDate"].Value = EndDate;

  • Report between two dates

    I have a report where I'm using between to select two dates. For example:
    select * from empl
    where empdate between '1-AUG-04' and '1-SEP-04'
    The problem however is that I want to also view any records where the empdate is on the 1-AUG-04 and 1-SEP-04. These records are left out because its looking for records between these dates. I've also tried
    select * from empl
    where empdate >= '1-AUG-04' and <= '1-SEP-04'
    but the problem remains. Is there some way around this problem or do I simply have to make sure the user uses a wider search criteria to catch these records?
    thanks,
    Ian

    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    SQL> select * from emp;
         EMPNO EMPNAME                            DEPTNO     SALARY EMPDATE
           101 J SMITH                                10       3500 02-NOV-04
           201 G HUNTER                               20       4000 13-OCT-04
           301 G WOLF                                 30       4200 18-OCT-04
           102 Y HIA                                  10       4100 28-OCT-04
           202 Y JHUNG                                20       3600 08-OCT-04
           302 S KUMAR                                30       3700 18-SEP-04
    6 rows selected.
    SQL> select * from emp where trunc(empdate) between '18-SEP-04' and '02-NOV-04';
         EMPNO EMPNAME                            DEPTNO     SALARY EMPDATE
           101 J SMITH                                10       3500 02-NOV-04
           201 G HUNTER                               20       4000 13-OCT-04
           301 G WOLF                                 30       4200 18-OCT-04
           102 Y HIA                                  10       4100 28-OCT-04
           202 Y JHUNG                                20       3600 08-OCT-04
           302 S KUMAR                                30       3700 18-SEP-04
    6 rows selected.
    But if I do it in Laurent's way (just to write better, It doesn't work:
    SQL> select * from emp where empdate >= date '2004-09-18' and empdate < '2004-11-03';
    select * from emp where empdate >= date '2004-09-18' and empdate < '2004-11-03'
    ERROR at line 1:
    ORA-01861: literal does not match format string
    Laurent, any suggessions?
    Thanks
    Biswa

  • URGENT..Date Query..How to Query Records created between 2 dates..

    Hi,
    I want to Query records which are created between 2 dates.
    I can use trunc(creation_date) this will give all the records for that day.
    I have to run a program every 15-20 minutes.
    following is an example
    example
    sysdate = 1/19/03 1:03:42 PM
    record1 creation date = 1/17/03 11:54:10 AM
    record2 creation date = 1/17/03 11:53:49 AM
    record3 creation date = 1/17/03 11:53:08 AM
    last resuest_date = 1/17/03 10:00:08 AM
    now i have to query records created between
    sysdate and last_request_date
    please reply ASAP
    Thanks
    Arun

    SELECT TO_CHAR(creation_date, 'DD-MON-YYYY') creation_date
    FROM navneet
    WHERE TO_CHAR(TO_DATE(creation_date, 'DD-MON-YYYY'), 'DD-MON-YYYY') BETWEEN
    TO_CHAR(TO_DATE('17-JAN-2003', 'DD-MON-YYYY'), 'DD-MON-YYYY') AND
    TO_CHAR(TO_DATE('20-JAN-2003','DD-MON-YYYY'),'DD-MON-YYYY');

  • How to calculate the month difference between two date char. in Query?

    Customers would like to see how many months passed between two date type of characteristics (e.g., the month difference between the current date and the scheduled delivery date in the record) and put the result into the column as KF. 
    We would have to grab the fiscal year/period kind of value and then do the subtraction, e.g., if the current date value is 2/28/2008 and the scheduled delivery date value in the record is 12/01/2007, the correct result should be 2 month difference between these two date values, but could someone here give us the technical light on how to make this happen in query design?
    Thanks and we will give you reward points for the correct anwsers!

    Hi Kevin,
    The Badi is RSR_OLAP_BADI.
    You can create an implementation using Transaction  SE18.
    The implementation is per cube and is defined in the filters.
    In the Implementation you have the following methods :
    1. Define : Here you will provide the Keyfigure you need as a virtual one.
    2. Initilialize : Any Init Function you want to do.
    3. Compute. This is called per datarecord and here you can cimpute your value.
    Hope this helps.
    Pralay Ahluwalia

  • Select Query Between two dates...

    Hi Guru's,
    I need a Select Query between two dates, also if the record not found for any in between date then it should return NULL or 0 ...
    for Example
    1. I am having two records in DB for date 2-10-2008 & 4-10-2008
    2. Now suppose I have given Query for date between 1-10-2008 to 5-10-2008
    Then it should return me 5 records with valid values for 2 & 4 and NULL for other 1,3,5
    Thanks.

    Try like this:
    with
      t as
          select date '2008-10-02' as dt, 'Record #1 (in DB)' as str from dual union all
          select date '2008-10-04' as dt, 'Record #2 (in DB)' as str from dual
    select v.dt, t.str
      from (
             select date '2008-10-01' + level - 1 as dt
               from dual
             connect by level <= (date '2008-10-05' - date '2008-10-01') + 1
           ) v
      left join t
        on v.dt = t.dt
    order by 1

  • Select Record Between Date Gap-Oracle 11g, Windows 2008 server

    hello everyone,
    I have a sql query where I need to select only records with an 18 month gap between max(date) and previous date( no dates between max(date)
    and 18 month gap date), when I run the below query it should only select supid 130, not 120 (even though 120 does contain an 18 month gap date it also has a date that is less then the 18 month gap( '25-NOV-2012','DD-MON-YYYY').
    how would get the query to look back 18 months for the next date and evaluate the month_between.
    any help is greatly appreciated.
    example:
    create table supply(supID number(8), supply varchar2(20), supdate Date,supamount number(13,2));
    insert into supply values(100,'Tapes',to_date('01-AUG-2013','DD-MON-YYYY'),50.00);
    insert into supply values(100,'TV',to_date('01-APR-2013','DD-MON-YYYY'),250.00);
    insert into supply values(100,'Discs',to_date('25-DEC-2012','DD-MON-YYYY'),25.00);
    insert into supply values(120,'Tablets',to_date('25-AUG-2013','DD-MON-YYYY'),15.00);
    insert into supply values(120,'Paper',to_date('25-NOV-2012','DD-MON-YYYY'),35.00);
    insert into supply values(120,'Clips',to_date('20-NOV-2010','DD-MON-YYYY'),45.00);
    insert into supply values(120,'Binders',to_date('28-FEB-2012','DD-MON-YYYY'),25.00);
    insert into supply values(130,'Discs',to_date('25-JUL-2013','DD-MON-YYYY'),75.00);
    insert into supply values(130,'Calc',to_date('25-JAN-2012','DD-MON-YYYY'),15.00);
    insert into supply values(130,'Pens',to_date('15-DEC-2011','DD-MON-YYYY'),55.00);
       select * from supply p where to_char(p.supdate,'yyyy')='2013'
       and p.supid in(select s.supid from supply s where months_between(s.supdate,p.supdate)<-18)
         SUPID SUPPLY               SUPDATE    SUPAMOUNT
           120 Tablets              25-AUG-13         15
           130 Discs                25-JUL-13         75

    Something like this?
    select
    from (
    select
      supid
    , supply
    , supdate
    , supamount
    , lead(supdate) over (partition by supid order by supdate desc) ldate
    from supply
    where
    months_between(supdate,ldate) >= 18
    SUPID
    SUPPLY
    SUPDATE
    SUPAMOUNT
    LDATE
    130
    Discs
    07/25/2013
    75
    01/25/2012
    Ok. i see you want only he diff to max date.
    select
    from (
    select
      supid
    , supply
    , supdate
    , supamount
    , lead(supdate) over (partition by supid order by supdate desc) ldate
    , row_number() over (partition by supid order by supdate desc) rn
    from supply
    where
    months_between(supdate,ldate) >= 18
    and
    rn = 1
    Message was edited by: chris227
    extended

  • Hierarchical Tree Data Query/Record Group Question

    I need help with Hierarchical Forms right now. I'm currently trying to implement a hierarchical tree to display the different items in different categories. I have been reading up on it for the past few days, and i do not understand a few things.
    What is the difference between a data query and record group? they seem the same to me.
    How does the XX = prior XXX work? i understand that this is what connects the parent to the child.
    How do you determine what depth the node is? its done in the record group/data query, but how do i decide what level it is dynamically?
    Thanks a lot in advance!

    Thanks! I am unable to create a table specifically for the tree because i am using tables that have been ported live and are in use. My question about levels is how do I know which depth the node is. For example, i have a category called Information Technology and a category item called Business Informatics. I want to know how to decide that the Category(information technology) is on level 1 and the Item(business informatics) is on level 2.
    Information Technology
    |_
    Business Informatics
    And i do know how the Connect By XX = prior XXX works in the data query/record group.
    Thanks for your help!

Maybe you are looking for

  • Error 1324 The path MyPictures contains an invalid character

    Just purchased IPod and in trying to load CD or in downloading get the same error message and have no clue as to how to correct it. Appreciate any help.

  • HTTPS to Multiple HTTP service and ports

    Hello Guys, I am trying to set up a config in a one armed design with client connecting via https that should be redirected to differents http servers (some are port 80 others 8080 and 9000) and depending on the end of the HTTPS url I have to rewrite

  • Role for a key user in BW

    Hi gurus, I want to build a role for my BW key users - they should be able to build queries in BEx Query Designer on all available InfoProviders and display the results. Which authorization objects should they get? Is there any standard role good for

  • Adobe mobile reader 2.0 install fails in my T-Mobile Wing with WM6

    The installation goes fine until the phone screen asks to install to phone or storage card.  I checked storage card then the install fails.  I have tried many times with the same results.  I install to my daughters T-mobile wing with no problems.  An

  • OSB queuing

    Dear OTN, Recently I've been having a discussion with our architect regarding queueing in OSB. Our main system is using Tuxedo as an adapter to a Legacy Service. The service is rather simple and endpoint communication protocol is telnet. The problem