Date show between period

I would like to find date between from_date and to_date like if a user what's to see dates between '26-SEP-2005' TO '05-OCT-2005' then the result shows following
26-SEP-2005
27-SEP-2005
28-SEP-2005
29-SEP-2005
30-SEP-2005
01-OCT-2005
02-OCT-2005
03-OCT-2005
04-OCT-2005
05-OCT-2005
is any one knows how to extract these type of data from query or forms or any oracle build-in tool. But remember i m using Oracle 9i Database and Form 6i Developer.

This works in SQL Plus. You can adapt it to forms:
Declare
Beg_date date := to_date('26-SEP-2005','DD-MON-YYYY');
End_date date := to_date('05-OCT-2005','DD-MON-YYYY');
Begin
For R in
   (Select (Beg_date - 1 + rownum) as each_day
      from all_tab_columns
      where rownum <= End_date - Beg_date + 1 )
  Loop
    Dbms_output.Put_line(to_char(R.each_day,'DD-MON-YYYY') );
  End loop;
End;
/Output from running the above looks like this:
26-SEP-2005
27-SEP-2005
28-SEP-2005
29-SEP-2005
30-SEP-2005
01-OCT-2005
02-OCT-2005
03-OCT-2005
04-OCT-2005
05-OCT-2005

Similar Messages

  • Query to search between two specific dates and time period

    Hi,
    Need a query to search between two particular dates and time period
    Like i want to search table having one date field .
    Suppose the date range is '01-JUL-06' and '01-AUG-06' and time frame
    is 23:00:00 to 08:00:00
    i.e i want to search between dates 01 july to 01 aug and also within the time frame i.e 23:00 to 08:00 hrs only

    The general principle is
    SELECT * FROM your_table
    WHERE some_date BEWTEEN to_date('01-JUL-06') and to_date('01-AUG-06' )+0.99999
    AND  ( some_date <= trunc(some_date)+8/24
               OR  some_date >= trunc(some_date)+23/24 )
    /Cheers, APC

  • How do I calculate the difference between periods in Crosstab

    Using Discoverer 4.1 with 11i General Ledger.
    I want to do a crosstab report that compares the differences in amounts from one period to another.
    The table is:
    ACCOUNT - PERIOD - AMOUNT
    Down the left it will show the account number, across the top it will show this month and last month, and the data point is period net. I want a third column that will show the difference between them.
    Example:
    _______JAN-04___FEB-04__Change
    4000____10.00____15.00____5.00
    5000____20.00____30.00___10.00
    6000____30.00____45.00___15.00
    7000____40.00____60.00___20.00
    Is this possible in Discoverer?

    The only way I know of to do what you are asking is to create a calculated field (previous_period) using the lag function
    lag(period_net,1) over (partition by account order by period) then create another calculated field (change) (period_net - previous_period). You might want to review the syntax of the lag function, I'm not sure it's exactly right, but it's in the ball park.
    Hope this helps. If anyone else is got a better way, I would sure like to know, because this is causing us headaches also.
    Thanks,
    Carl Petersen
    Good Humor - Breyers Ice Cream

  • VPD date issue between 10.1 and 10.2 databases

    I have uncovered an issue today with VPD against date fields. The issue came up at a client site on a 10.2 database. When I got back to the hotel and tried this on my own database, which is 10.1, I got no issue and everything worked ok.
    Therefore, I am asking if anyone is able to try out the following for me on different Oracle databases and platforms and let me know whether it worked for you or not. I'd like to compile a list of database versions and platforms on which the issue occurs.
    Step 1: create this table as a user
    CREATE TABLE TST_DATE AS (
    SELECT 1 PERSON_UID,
    Trunc(SYSDATE) BIRTH_DATE,
    To_Char(Trunc(SYSDATE), 'DD-MON-YYYY') CHAR_DATE,
    123456 TAX_ID,
    'Smith, Michael B.' FULL_NAME FROM dual);
    Step 2: grant select rights on the table
    GRANT SELECT ON TST_DATE TO PUBLIC;
    Step 3: switch your login to SYS and run this script:
    CREATE OR REPLACE FUNCTION F_CHECK_ITEM_TST(p_object_schema in varchar2, p_object_name varchar2)
    RETURN VARCHAR2 IS
    V_PREDICATE VARCHAR2(2000) := '1 = 2';
    BEGIN
    RETURN(V_PREDICATE);
    END F_CHECK_ITEM_TST;
    Step 4: As SYS, run this to grant access rights over the function
    GRANT EXECUTE ON F_CHECK_ITEM_TST TO PUBLIC;
    Step 5: As SYS, run this to enable the policy
    BEGIN DBMS_RLS.ADD_POLICY(
    OBJECT_SCHEMA => 'DRAKE',
    OBJECT_NAME => 'TST_DATE',
    POLICY_NAME => 'SecByTST',
    FUNCTION_SCHEMA => 'SYS',
    POLICY_FUNCTION => 'F_CHECK_ITEM_TST',
    STATEMENT_TYPES => 'SELECT',
    POLICY_TYPE => DBMS_RLS.DYNAMIC,
    SEC_RELEVANT_COLS => 'BIRTH_DATE',
    SEC_RELEVANT_COLS_OPT => DBMS_RLS.ALL_ROWS);
    END;
    Note: in the above policy change the OBJECT_SCHEMA name to be the name of the user who owns the table you created in Step 1
    Step 6: Go into Discoverer Admin and import the table as a new folder.
    Be sure to uncheck the "Date hierarchies" box and set "Default aggregate on data points" to detail. Grant access to any user.
    Step 7: Using Desktop or Plus, log in as that user then try to query the folder with the date not included, there should be no problem.
    Step 8: Now try to query with the date included
    On my 10.2 database I get ORA-24334: no descriptor for this position. This happens when logged into Discoverer as the table owner, EUL owner or any other user. However, when logged into Discoverer as SYS which is exempt from all VPD policies, there is no error when the date is included.
    We tried this in Discoverer Desktop, Plus and Viewer with the same results in all three. We can successfully query the table from SQL*Plus, SQL Developer and TOAD.
    There also seems to be no issue at all with the 10.1 database so there seems to be an issue between Discoverer and the 10.2 database.
    What do you think?
    P.S. to cancel the policy use this script when logged in as SYS:
    EXEC DBMS_RLS.drop_policy(
    OBJECT_SCHEMA => 'DRAKE',
    OBJECT_NAME => 'TST_DATE',
    POLICY_NAME => 'SecByTST');
    This same information is available on my blog in a more readable format here:
    http://learndiscoverer.blogspot.com/2006/12/vpd-date-issue-between-101-and-102.html

    Hi Rod
    Well don't you just love Oracle. Obviously, whatever tests were done for certifying Discoverer against the 10.2 database did not include checking VPD policies. This merits a blog entry from me.
    Your workaround for V_PREDICATE VARCHAR2(2000) := 'BIRTH_DATE=TO_DATE(''01-JAN-0001'')'; works. However, I had to write a new function to do this because my real function was trapping about a dozen items at the same time, some dates, some numbers and some varchars - exactly the way that the Oracle example code shows it in the 10.2 database manual.
    So what I did was to create a new function that only handles dates and added a dedicated policy that works with only that function. Unfortuately, because I have many dates to manage, I was unabe to hard code the BIRTH_DATE so here is what I did:
    V_PREDICATE VARCHAR2(2000) := 'SYSDATE = TO_DATE(''01-JAN-0001'')';
    This works perfectly and Discoverer stopped complaining. It just has two policies on the same table for different data items. Isn't VPD cool? I'm hooked.
    I really appreciate your time and effort on this. Now, let's see what Oracle support make of the issue because I raised a service request last night. No reply yet I'm afraid.
    Best wishes
    Michael

  • Date entered between valid from and valid to it should throw error

    HI  i have a doubt in the dates see
    i have a column for the valid  from and valid to date
    EXAMPLE
    customer  cform NO                 SUBMITTED               VALID FROM            VALID TO         uSER
    17     OUIIUYUIY     02.04.2008     03.04.2008     03.12.2008    SAB_BEGUM
    WHEN I GIVE  the dates in between the period it has to give throw the error
    example if i give like as shown below it should pass the error
    17      FHGFF2                   02.04.2008                     03.04.2008              03.06.2008         SAB_BEGUM
    now how can i pass and check the the dates, it has to accept ones the date is after 04.12.2008 , in between the period it should throw the error. please help me out

    have a look at this:
    http://help.sap.com/saphelp_nw70/helpdata/EN/a7/5139ef407a11d1893b0000e8323c4f/frameset.htm
    and search for the pre defined events in table maintenance dialog.
    generate table maintenance->create a maintenance dialog->Maintaining and changing an existing maintenance dialog ->Extended Table Maintenance Events.

  • Facing issues with 3g Mobile Data Usage Current Period and Apps Volumes are differ.

    Hi All,
              i am facing some data mismatch with my iphones. the actual mobile data usage volume and data usage for Apps volumes are showing different data.
    for eg : Mobile Data Usage - Current Data Usage - Current Period volumes showing 342 MB but if i check the  Use Mobile Data For Apps Volumes for all Apps including System Service Data's and Uninstalled Data's are showing very less ( around 200 MB only ) compare with Current Period Volumes.
    Mobile Data Usage - Current Data Usage - Current Period  and Use Mobile Data For Apps ( Apps wise data usage ) Data's are not matching..
    Please let me know will it show like that only or its an issue ????  if you want i can share the screen shot as well.

    Hello kasinathadurai,
    Welcome to the Apple Support Communities!
    I understand that you have some questions about cellular data usage and apps that use cellular data. For this question, I would refer you to the attached article that will help explain how data usage, call time, and app cellular data is calculated. 
    Learn about cellular data settings and usage on your iPhone and iPad (Cellular Model) - Apple Support
    Have a great day,
    Joe

  • Sql query - Selecting last recorded values for each date in specified period

    Hello,
    Can someone please help me with my problem.
    I'm trying to get last recorded balance for each day for specific box (1 or 2) in specified period of days from ms access database using ADOTool.
    I'm trying to get that information with SQL query but so far unsuccessfully...  
    My table looks like this:
    Table name: TestTable
    Date Time Location Box Balance
    20.10.2014. 06:00:00 1 1 345
    20.10.2014. 12:00:00 1 1 7356
    20.10.2014. 18:45:00 1 1 5678
    20.10.2014. 23:54:00 1 1 9845
    20.10.2014. 06:00:02 1 2 35
    20.10.2014. 12:00:04 1 2 756
    20.10.2014. 18:45:06 1 2 578
    20.10.2014. 23:54:10 1 2 845
    21.10.2014. 06:00:00 1 1 34
    21.10.2014. 12:05:03 1 1 5789
    21.10.2014. 15:00:34 1 1 1237
    21.10.2014. 06:00:00 1 2 374
    21.10.2014. 12:05:03 1 2 54789
    21.10.2014. 15:00:34 1 2 13237
    22.10.2014. 06:00:00 1 1 8562
    22.10.2014. 10:00:00 1 1 1234
    22.10.2014. 17:03:45 1 1 3415
    22.10.2014. 22:00:00 1 1 6742
    22.10.2014. 06:00:05 1 2 562
    22.10.2014. 10:00:16 1 2 123
    22.10.2014. 17:03:50 1 2 415
    22.10.2014. 22:00:10 1 2 642
    23.10.2014. 06:00:00 1 1 9876
    23.10.2014. 09:13:00 1 1 223
    23.10.2014. 13:50:17 1 1 7768
    23.10.2014. 19:47:40 1 1 3456
    23.10.2014. 21:30:00 1 1 789
    23.10.2014. 23:57:12 1 1 25
    23.10.2014. 06:00:07 1 2 976
    23.10.2014. 09:13:45 1 2 223
    23.10.2014. 13:50:40 1 2 78
    23.10.2014. 19:47:55 1 2 346
    23.10.2014. 21:30:03 1 2 89
    23.10.2014. 23:57:18 1 2 25
    24.10.2014. 06:00:55 1 1 346
    24.10.2014. 12:30:22 1 1 8329
    24.10.2014. 23:50:19 1 1 2225
    24.10.2014. 06:01:00 1 2 3546
    24.10.2014. 12:30:26 1 2 89
    24.10.2014. 23:51:10 1 2 25
    Let's say the period is 21.10.2014. - 23.10.2014. and I want to get last recorded balance for box 1. for each day. The result should look like this:
    Date Time Location Box Balance
    21.10.2014. 15:00:34 1 1 1237
    22.10.2014. 22:00:00 1 1 6742
    23.10.2014. 23:57:12 1 1 25
    So far I've managed to write a query that gives me balance for ONLY ONE date (date with highest time in whole table), but I need balance for EVERY date in specific period.
    My incorrect code (didn't manage to implement "BETWEEN" for dates...):
    SELECT TestTable.[Date], TestTable.[Time], TestTable.[Location], TestTable.[Box], TestTable.[Balance]
    FROM TestTable
    WHERE Time=(SELECT MAX(Time)
    FROM TestTable
    WHERE Location=1 AND Box=1 );
    Tnx!
    Solved!
    Go to Solution.

    For loop
    following query keep day (here 24 in below query) Variable from ( 1 to 28-29/30/31 as per month)
    SELECT TOP 1 TestTable.[Date], TestTable.[Time], TestTable.[Location], TestTable.[Box], TestTable.[Balance]
    FROM Test Table.
    WHERE  Time=(SELECT MAX(Time) FROM TestTable WHERE Location=1 AND Box=1 )
    AND DATE = "2014-10-24";
    PBP (CLAD)
    Labview 6.1 - 2014
    KUDOS ARE WELCOMED.
    If your problem get solved then mark as solution.

  • DSO Analysis Report : Show wrong period

    I have created the new Variant for DSO Selection Programme RFDRRE05 to get the DSO for Credit Representative Group for closed period (i.e. now Period one is going, it should consider period value as 12). For this we created and assigned a Variable to be updated from TVARV table.
    Surprisingly, when I look a the Variable assigned to the Variant for DSO Selection Programme RFDRRE05, I can see the period value as 12 but when I see the selection Log in DSO Report (T Code F.30) it shows period value as 10.
    The report is picking up the variant from INDX table as mentioned below,
    IMPORT GENR_LDBPG
           GENR_RRSEL
           GENR_RREXX
           SOPT_RRSEL
           SOPT_RRSEL_DYN
           SOPT_RREXX
    FROM DATABASE RFRR(RR) ID RRCATKY.
    IF SY-SUBRC NE 0.
      MESSAGE A517.
    ENDIF.
    Please let me know which program is updating this INDX table.
    I would highly appriciate your quick response.
    Best regards,
    Sanjeev Jain

    Dear Ajay,
    I've checked  the configuration by following details;
    1. Period control setting in AFAMP :  002
        - Period control: Acquisition : 01 (Pro rata at period start date)
        - Period control: Acquisition in the following year : 01 (Pro rata at period start date)
        - Period control: Retirement : 02 (Pro rata upto mid-period at period start date)
        - Period control : Transfer : 02 (Pro rata upto mid-period at period start date)
    2. Period control setting in OAVH
       - FV: K4, Period Control : 01 -> Month : 0, Day 0
       - FV: K4, Period Control : 02 -> Month : 1, Day 15
    3. Changeover method : 05 (Changeover after end of the useful life)
    The problem occurred for some asset that acquisition on last year.
    Could you please help me to investigate and solve this problem?
    Thank you for your suggestion.
    VirgoGirl
    Edited by: virgogirl on Mar 7, 2011 4:39 AM

  • Need charting help - multiple data points between major ticks

    Hi,
    I am trying to create an AreaChart in which the data shows a
    consumption rate over the course of a week. The major points along
    the x-axis will be Monday, Tuesday, ... , Sunday (the days of the
    week). However, there are multiple data points between each day. I
    only want the days of the week to show on the axis but I want to
    plot all of the data points. How would I go about accomplishing
    this task?
    Thanks in advance,
    Brent Schooley

    Thanks, it is getting closer now. My only problem now is that
    the data points do not line up correctly with the tick marks. I've
    look through the documentation and I can't figure out what to do to
    ensure this happens. Here are the relevant portions of my code:
    [Bindable]
    public var energyDataAC:ArrayCollection = new
    ArrayCollection( [
    {date: "2007, 7, 27, 0", saved: 0},
    {date: "2007, 7, 27, 12", saved: 50},
    {date: "2007, 7, 28, 0", saved: 35},
    {date: "2007, 7, 28, 12", saved: 0},
    {date: "2007, 7, 29, 0", saved: 0},
    {date: "2007, 7, 29, 12", saved: 46},
    {date: "2007, 7, 30, 0", saved: 39},
    {date: "2007, 7, 30, 12", saved: 0},
    {date: "2007, 7, 31, 0", saved: 0},
    {date: "2007, 7, 31, 12", saved: 44},
    {date: "2007, 8, 1, 0", saved: 45},
    {date: "2007, 8, 1, 12", saved: 0} ]);
    public function myParseFunction(s:String):Date {
    // Get an array of Strings from the comma-separated String
    passed in.
    var a:Array = s.split(",");
    // Create the new Date object.
    var newDate:Date = new Date(a[0],a[1],a[2],a[3]);
    return newDate;
    <mx:AreaChart id="Areachart" height="100%" width="100%"
    paddingLeft="5" paddingRight="5"
    showDataTips="true" dataProvider="{energyDataAC}" >
    <mx:horizontalAxisRenderer>
    <mx:AxisRenderer styleName="myAxisStyle"/>
    </mx:horizontalAxisRenderer>
    <mx:horizontalAxis>
    <mx:DateTimeAxis alignLabelsToUnits="true"
    dataUnits="hours" labelUnits="days" dataInterval="12" interval="1"
    parseFunction="myParseFunction"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:AreaSeries yField="saved" xField="date"
    form="segment" displayName="Energy Saved"/>
    </mx:series>
    </mx:AreaChart>
    <mx:Legend dataProvider="{Areachart}"/>
    Any ideas?
    Thanks,
    Brent

  • Export data for specific period through Data Pump

    Hi,
    I've a specific requirement to take the dumps of some tables for specific time period. like between last 10 days like 01-JAN-11 to 10-JAN-11. How can I acommplish this. For Documentation what I read is that we can export the data for specific period of thie by either setting FLASHBACK_SCN or FLASHBACK_TIME parameter in expdp command but this is point in time export not for the specific time export.
    Please guide me how can export between the specific time. like between 1-JAN to 10-JAN
    Regards,
    Abbasi

    export between the specific time. like between 1-JAN to 10-JANYou need to clarify your requirements. Data is always "at a point in time". I can see data as at noon of 01-Jan. I can see data as at noon of 10-Jan. What would I mean by data "between" 01-Jan and 10-Jan ?
    Say the table has 5 rows on 01-Jan :
    ID    VALUES
    1      ABC
    2      DEF
    3      TRG
    4      MXY
    5     DEW2 Rows "6-GGG" and "7-FRD" were inserted on 02-Jan.
    2 Rows "2" and "3" were updated from "DEF" and "TRG" to "RTU" and "GTR" on 03-Jan.
    1 Row "5-DEW" was deleted on 09-Jan.
    2 Rows "8-TFE" and "9-DZN" were insereted on 09-Jan.
    Can you tell me what is the "data between 01-Jan and 10-Jan" ?
    (the above example actually happens to have an incrementing key column "ID". Your table might not even have such an identifier column at all !)
    Hemant K Chitale
    Edited by: Hemant K Chitale on Jan 10, 2011 5:23 PM

  • No data show up after reconfigure database instance

    after remove the database instance in the grid control, rediscover it and then reconfigurate, no more data show up again in the grid control. there is no any change between remove and reconfiguration. any body know why?

    bounce the agent and check

  • Data Mismatch between ODS and Infocube

    Hi,
    I have got data mismatch between from ODS to Infocube. In ODS for one Sender Cost Centre, there is only one Company Code. In Infocube it is showing many.For ODS datasource is 0HR_PT_1. In Updaterules of ODS, Company Code was assigned to Company Code. But in Infocube should  I assign CompCode to Comp Code or any other Characteristic as Master Data Attr of. Plz suggest us.
    It is very urgent.

    post ur  BW related querures in BW forum

  • Data mismatch between two clients

    Hi,
    I have a query on data mismatch between two clients.
    For eg assume a functional consultant would have configured intially some 5 custom document types and captured that in a transport request (TR1234) and promoted from one system/client (in my case QG1/821) to another system/client (say QG4/821). Again he would have configured another 3 custom document types and put in a transport request (TR4567) and promoted it. The transport request TR4567 some how did not reach QG4/821. Hence it shows only 5 records in T003 table (document types table) in QG4/821 and 8 records in QG1/821. How do we identify which is the correct transport (in this case TR4567), so that this transport can be promoted to QG4/821, so that both QG1/821 and QG4/821 are in sync.
    Similary such a discrepancy exists for custom tables also. I am not able to catch hold of any basis people for inputs on this. Hence pls advise.
    Regards
    Vimal Kumar

    development objects can be compared using, Compare the active versions in both the system. (Use remote comparision)
    But this you have to maually check.

  • Difference between Periodic scheduling & deadline Monitoring.

    Hi Gurus,
    i want to know the difference between Periodic scheduling & deadline Monitoring.
    its gud if u explained with short example.
    Thanks in Advance..
    regards,
    Amol.

    Hello,
    If you enter the start date or initial counter reading in the scheduling parameters, then you can start the automatic deadline monitoring directly for the maintenance plan (see Scheduling a Maintenance Plan automatically).
    If you do not enter the start date or initial counter reading in the scheduling parameters, then you must start the scheduling for the maintenance plan manually before you can start the automatic deadline monitoring (see First-Time Scheduling).
    For More Details about Schedulin you can refer below Link [http://help.sap.com/saphelp_nw04/helpdata/en/3c/abb350413911d1893d0000e8323c4f/content.htm]
    Reagrds,
    Rakesh
    Edited by: RAKESH ASHOK MANE on Aug 24, 2010 12:29 PM

  • Why does file date show 1970 on files transfered to iTunes app window?

    I am finding that files transfered to the apps section in iTunes shows last updated time different from the actual file date on the Mac.
    This is happening for both Numbers, Pages and PDF HD . I just did a file sync of a PDF I created and the date in the iTunes window shows 5/27/70 9:00 am (should have been 6/30/10 12:52 pm, the date that is on the original Mac file). Dates vary between 1970 and 1971. There wasn't even a Mac on those dates!!!
    Only one PDF has the correct date which is the iPad Manual (downloaded from Apple). All the files that have incorrect dates were PDF files created from my applications (Finale, InDesign, and DVDpedia). I have tested other downloaded PDFs from other sources and they all show 1970's dates on them in the iTunes App window.
    This really has no real impact other than being able to determine if the most recently created file is the one on the iPad. Now, I have to delete the current file in the iTunes window and add the file again from the Mac finder to be sure. Not at all a good solution.
    Is this an iTunes bug

    On older computers there was a PRAM battery that would last only so long then needed changing. If the battery went dead then when the computer started it would default to a the dates you have noted.
    iTunes will use the current system date to reflect the 'date added' information.
    http://www.macupgrades.co.uk/store/productinfo.php?productsid=314
    MJ

Maybe you are looking for

  • Mapping between ABAP and Java IPC structure

    Hi all:         Somebody know how translate the following abap structure to java: KOMK-KDUMMY = 'X' KOMP-PSTYV = 'ZTAD' KOMK-ZZNTGEW Help me please!!!

  • Stupid annoying problem =/  _root.score += 1; ?

    Such a stupid question, but I can't seem to find the right answer on the Internet and I'm feeling a bit impatient. So I have this dynamic text labeled "score" in the var box. Then I have a button with the code: on (release) {     _root.score += 1; So

  • 10.5.6 beware

    The Mac, god bless it, is so reliable, so dependable it's very easy to take its stability for granted. So if you use a Mac, or know anyone who does, it would be a good idea to forward this message on to them. For me downloading and installing Apple's

  • My computer is failing to recognize my Itouch.

    When I plug it in, says "charging is not supported with this accessory." And it seems to only recognize the camra because a box thats says "Apple Ipod" opens and inside has "Camra connected" and links for me to open "microsoft" and "Photoshop." I hav

  • Where can i find the menu box for firefox

    i am trying to play games on pogo some of them will not load. when i go to find out why it says go to foxfire menu and i cant find t. please help me thanks