Download all dates previous 80 from the current date.

Hi all

If I get start date and number of days as parameters to query then query must return all dates previous 80 starts to count.

As of now, we can hard code number of the days and begin to reach this day. Please let me know how I can achieve this.

Thanks and greetings
Nana AKkivalli.

That should do it...

DTYLER_APP@pssdev2> var startdate   varchar2(10)
DTYLER_APP@pssdev2> var numdays     number
DTYLER_APP@pssdev2> exec :startdate := '01/09/2011'

PL/SQL procedure successfully completed.

STARTDATE
--------------------------------
01/09/2011

DTYLER_APP@pssdev2> exec :numdays := 10

PL/SQL procedure successfully completed.

   NUMDAYS
----------
        10

DTYLER_APP@pssdev2>
DTYLER_APP@pssdev2> SELECT
  2      TO_DATE(:startdate,'dd/mm/yyyy') - (rownum - 1) dt
  3  FROM
  4      dual
  5  CONNECT BY
  6      LEVEL <= :numdays
  7  /

DT
--------
01-09-11
31-08-11
30-08-11
29-08-11
28-08-11
27-08-11
26-08-11
25-08-11
24-08-11
23-08-11

10 rows selected.

Tags: Database

Similar Questions

  • show only five dates Monday from the current date.

    All,

    I have the column date in dd/mm/yyyy format, I need to show the rear 5 date of Monday, from the current date.

    in the warehouse we t have the column NAME OF THE DAY.

    Help me.


    Thank you


    CASE WHEN DAYOFWEEK (DATE_FIELD) = 2

    AND

    DATE_FIELD > TIMESTAMPADD (SQL_TSI_DAY-35, CURRENT_DATE)

    AND DATE_FIELD<>

    THEN

    DATE_FIELD

    END

    Please check and change-35, according to the needs.

    Please check if it is correct.

  • Hello. I'm just a beginner and I downloaded the itunes 12.3.3 update and now when I right click on a work of art albums all disappear from the track of this album. I also have problems with my get info tab. All of my info from the album crashes.

    Hello. I'm just a beginner and I downloaded the itunes 12.3.3 update and now when I right click on a work of art albums all disappear from the track of this album. I also have problems with my get info tab. All of my info from the album crashes.

    This can help (from turingtest2):

    Fix iTunes for Windows security permissions

  • currently still have PP CS5.5 &amp; want to install on another office, understand that I can only use one at a time. don't have a CD, can I get information from the current installation and a link to download PP CS5.5?

    currently still have PP CS5.5 & want to install on another office, understand that I can only use one at a time. don't have a CD, can I get information from the current installation and a link to download PP CS5.5?

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a link to access a page to download the Adobe programs if you do not have a disk or drive

    Find your http://helpx.adobe.com/x-productkb/global/find-serial-number.html serial No.

  • compare the value of previous line with the current value

    I need to compare the previous value with the current value. All Oracle functions could there be to do?
    Something similar as a result.
    If previous (Amt {}) > Current (({Amt}) then 0 Else Null.)

    Something like that?

    SQL> WITH test_data AS
      2  (
      3          SELECT 107019 AS ID, 1583 AS AMT FROM DUAL UNION ALL
      4          SELECT 107019 AS ID, 1572 AS AMT FROM DUAL UNION ALL
      5          SELECT 107019 AS ID, 1572 AS AMT FROM DUAL
      6  )
      7  -- END SAMPLE DATA
      8  SELECT  ID
      9  ,       (CASE
     10                  WHEN LAG(AMT,1) OVER (PARTITION BY ID ORDER BY ID) = AMT THEN NULL
     11                  ELSE AMT
     12          END) AS AMT
     13  FROM test_data;
    
            ID        AMT
    ---------- ----------
        107019       1583
        107019       1572
        107019
    
  • Browser keeps opening with previous tabs from the previous day. How can I stop this?

    Under Tools > Options > general, I have the browser when I open the browser to "open a white page" but it keeps opening the previous tabs from the night before. How can I stop this? I read the advice of the forum but not found or overlooked the answer. I checked all my other settings and can't find anything that could be the cause. Please advise?

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

  • all samples n transferred from the buffer

    Hi all

    I have a question for every N samples transferred DAQmx event buffer. By looking at the description and the very limited DevZones and KBs on this one, I am inclined to believe that the name is perfectly descriptive of what must be his behavior (i.e. all samples N transferred from the PC buffer in the DAQmx FIFO, it should report an event). However, when I put it into practice in an example, either I have something misconfigured (wouldn't be the first time) or I have a basic misunderstanding of the event itself or how DAQmx puts in buffer work with regeneration (certainly wouldn't be the first time).

    In my example, I went out 10 samples from k to 1 k rate - so 10 seconds of data. I recorded for every N samples transferred from the event of the buffer with a 2000 sampleInterval. I changed my status of application of transfer of data within the embedded memory in full with the hope that it will permanently fill my buffer with samples regenerated (from this link ). My hope would be that after 2000 samples had been taken out by the device (e.g., take the 2 seconds) 2000 fewer items in the DMA FIFO, it would have yielded 2000 samples of the PC for the FIFO DMA buffer and so the event fires. In practice it is... not to do so. I have a counter on the event that shows it fires once 752 almost immediately, then lights up regularly after that in spurts of 4 or 5. I am at a loss.

    Could someone please shed some light on this for me - both on my misunderstanding of what I'm supposed to be to see if this is the case and also explain why I see what I see now?

    LV 2013 (32 bit)
    9.8.0f3 DAQmx
    Network of the cDAQ chassis: 9184
    cDAQ module: 9264

    Thank you

    There is a large (unspecced, but the order of several MB) buffer on the 9184.  He came several times on the forum, here a link to an another discussion about this.  Quote me:

    Unfortunately, I don't know the size of this buffer on the 9184 on the top of my head and I don't think it's in the specifications (the buffer is also shared between multiple tasks).  This is not the same as the sample of 127 by buffer slot AO which is present on all chassis cDAQ - controller chassis ethernet / wireless contains an additional buffer which is not really appropriate I can say in published specifications (apparently it's 12 MB on the cDAQ wireless chassis).

    The large number of events that are triggered when you start the task is the buffer is filled at startup (if the on-board buffer is almost full, the driver will send more data — you end up with several periods of your waveform output in the built-in buffer memory).  So in your case, 752 events * 2000 samples/event * 2 bytes per sample = ~ 3 MB of buffer memory allocated to your task AO.  I guess that sounds reasonable (again would really a spec or KB of...) I don't know how the size of the buffer is selected).

    The grouping of events is due to data sent in packages to improve efficiency because there is above with each transfer.

    The large buffer and the consolidation of the data are used optimizations by NOR to improve flow continuously, but can have some strange side effects as you saw.  I might have a few suggestions if you describe what it is you need to do.

    Best regards

  • Large number of unwanted emails that all appear to come from the same source

    Original title: spam E

    Currently, I get a lot of junk emails that all appear to come from the same source. I was put in my blocked list but the sender then change the address source slightly and I get more. Does anyone know how I can stop this. My address change my only option

    You use Windows Mail? Assuming that the subject field also changes, you could do a message like that rule.

    Start with the only rule of AddressBook and you receive a message that you want people not in your address book (E-mail from companies, bills, your ISP, etc), you can add them to the rule.

    Tools | Message rules | Mail | New.

    Box 1 - Where the From line contains people {check it out}

    Box 2 - Check: delete it & stop processing more rules if you want that messages not in the address book to go to deleted items.

    Box 3 - Click on the blue words contains people

    Click on the first address to select it. Scroll to the end and hold down the SHIFT key while you click the last address. This will highlight all. Right-click on it and click on from the menu that appears.

    Now, click Options and choose: Message * contains no of * the people below in the top of the page Options area, then choose: Message corresponds to one of the people below in the background Options box.

    OK your way out of the new rule.

    Now, only the addresses that you entered will be uploaded to your Inbox.

    Remember, if you add a person to your address book, you must add to the rule. It will not automatically be added.

    Be sure to see these links for more options.

    A few tips:
    http://insideoe.tomsterdam.com/tips/rules.htm

    Message rules does not? :
    http://www.insideoe.com/FAQs/why.htm#rules

  • Where can download Adobe photoshop CS3 extended from the internet - I need to reinstall on a new calculated that doesn't have a CD player!

    My calculated new does not have a CD player and to transfer the software on a key USB is not working even after disabling of the software on the old computer.  Download Adobe photoshop CS3 extended from the internet?

    Make sure that you have enabled cookies and clear your cache.  If he continues to not try to use a different browser.

    Here is an alternative download...  You can download the demo version of the software through the page linked below and then use your current serial number to activate it.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    CS3 and CS4: http://prodesigntools.com/download-adobe-cs4-and-cs3-free-trials-here.html

  • How to get the phone and messages back in my dock apps? And for some reason, I discover now all my app pages from the middle of my phone and not at the top?

    How can I get the phone and messages apps in my dock? And for some reason, I discover now all my app pages from the middle of my phone and not at the top?

    Try

    Settings > general > reset > reset home screen presentation.

    Note: All other applications will be organised by alphabetical order.

  • I'm running windows media 8 on my toshiba and all my music disappeared from the media player.

    I'm running windows media 8 on my toshiba and all my music disappeared from the media player. I tried to put more music on it, but I get this message (can't rip1 or more tracks on this cd). Help!

    Original title: Media Player

    I'm running windows media 8 on my toshiba and all my music disappeared from the media player. I tried to put more music on it, but I get this message (can't rip1 or more tracks on this cd). Help!

    Original title: Media Player

    have you tried to restore default libraries? See http://answers.microsoft.com/en-us/windows/forum/windows_8-files/why-cant-open-any-of-my-libraries-in-windows-8/01526d22-f877-465c-9f13-e1ab864e1733

    --
    Barb

    MVP Windows Entertainment and connected home

    My Blog - http://digitalmediaphile.com/

    Connected world Blog Reader Windows 8 App Barb-
    http://apps.Microsoft.com/Windows/en-us/app/barbs-connected-world-blog/02f35769-52bf-461C-b1d5-06e54a58d298

    Windows and Surface drive Windows 8 App community
    http://apps.Microsoft.com/Windows/en-us/app/Windows-and-surface-community/0abb150e-D287-47d4-837E-9fa51f485ad7

    Please mark as answer if that answers your question

  • Get the data from the current quarter

    Hello

    I was wondering how I would go about getting data from a table that is in the current fiscal quarter?

    It's the simple query to get all the data:

    $q_calls_sql = "SELECT * FROM renewal_contact WHERE userid ='". "." ' $user_id. "'";

    $q_calls_query = $con-> query ($q_calls_sql);

    $q_calls_numrow = $q_calls_query-> num_rows;

    Here's what I currently show the quarterly data, but only shows do not all data:

    $q_calls_sql = "SELECT."

    OF renewal_contact

    WHERE the timestamp > = GETDATE(), DATEADD (qq, 1, getdate ()) & & timestamp < GETDATE(), DATEADD (qq, 2, getdate ()) ';

    $q_calls_query = $con-> query ($q_calls_sql);

    $q_calls_numrow = $q_calls_query-> num_rows;

    All I have to do is show the num_rows of the above query.

    MySQL QUARTER() function deals with calendar quarters rather than the fiscal quarters. In the United States, first by the federal Government's fiscal quarter begins October 1, dealing with MySQL as in the fourth quarter. The first fiscal quarter in California begins on 1 July, that MySQL considers (rightly) as of the third quarter.

    A way to get the quarter is to use a custom like this function:

    function getFiscalQuarter() {
      $month = date('n');
      $year = date('Y');
      switch ($month) {
          case 1:
          case 2:
          case 3:
              return ["$year-01-01", "$year-03-31"];
          case 4:
          case 5:
          case 6:
              return ["$year-04-01", "$year-06-30"];
          case 7:
          case 8:
          case 9:
              return ["$year-07-01", "$year-09-30"];
          default:
              return ["$year-10-01", "$year-12-31"];
      }
    }
    
    $quarter = getFiscalQuarter();
    
    $sql = 'SELECT * FROM renewal_contact
            WHERE `timestamp` BETWEEN "' . $quarter[0] . '" AND "' . $quarter[1] . '"';
    
  • How to get the old data 6 months from the current date?

    Hi friends,

    I have a table which includes historical data, which are having more than 1 years old data. The historical table gets updated once a week. My requirement is that I should get the latest data from the week of each month for 6 months according to the current data. I use oracle 10g.

    Can you please someone help in this.

    Thanks in advance

    SELECT last_day (ADD_MONTHS (TRUNC (SYSDATE, 'mm'),-LEVEL))-7 start_dt.
    LAST_DAY (ADD_MONTHS (TRUNC (SYSDATE, 'mm'),-LEVEL)) end_dt
    OF THE DOUBLE
    CONNECT BY LEVEL<=>

    change as a result, I have provided you the start and end dates for your logic...

  • How to create an automatic text field - has a date of three years from the current date?

    I'm trying to create a PDF form that is automatically entered a three-year expiration date in the future of the current date in a created text field.

    Text field name: ExpDate

    Text field format: mm/dd/yy

    So far, I entered in the following in the Page Properties-> Actions-> Add Action (trigger = Open Page, Action = run a JavaScript script):

    var ExpDate = new Date();

    ExpDate.setYear (ExpDate.getYear () + 3);

    var f = this.getField ("ExpDate");

    f.Value = util.printd ("mm/dd/yy", ExpDate);

    We will attend the correct expiration date the day where I do the certificate (i.e. There will be 07/06/16, June 7, 2016), but when I open it the next day will be always ready 07/06/16 instead of 06/08/16. I'm sure it is something simple that I need to change. Any ideas?

    If she says ' 07/06/16"on 7 June 2016, which means that it does not work properly, either, as it does not add 3 years to the date of the day... It should show ' 07/06/19.

    You see error messages in the console (Ctrl + J) JS when you open the file?

  • Limiting display but download all data in reports

    Hello

    Test data to https://apex.oracle.com/pls/apex/f?p=4550:1:0:

    workspace: bobdj

    UserID: dev

    password: dev123

    DEV01 application name

    Expected result: I want to only display 3 rows at a time and set the number of Maximum 10 lines

    I want to download all the data on employees (altogether 14 rows) to csv

    Problem: It downloads only 3 or 10 rows.

    I tried

    1. Select... where

    WHERE ROWNUM < = CASE WHEN coalesce(:request,'x') not like 'FLOW_EXCEL_OUTPUT %' THEN ANOTHER 3 END ROWNUM

    2 WHERE ROWNUM < = CASE WHEN: like '% FLOW_EXCEL_OUTPUT' and THEN ANOTHER 3 END ROWNUM

    using only the select * from emp I get only 10 lines instead of 14 rows.

    Thanks for any help.

    BobDJ wrote:

    Test data to https://apex.oracle.com/pls/apex/f?p=4550:1:0:

    workspace: bobdj

    UserID: dev

    password: dev123

    DEV01 application name

    Expected result: I want to only display 3 rows at a time and set the number of Maximum 10 lines

    I want to download all the data on employees (altogether 14 rows) to csv

    Problem: It downloads only 3 or 10 rows.

    I tried

    1. Select... where

    WHERE ROWNUM<= case="" when="" coalesce(:request,'x')="" not="" like="" 'flow_excel_output%'="" then="" rownum="" else="" 3="">

    2. WHERE ROWNUM<= case="" when="" :request="" like="" 'flow_excel_output%'="" then="" rownum="" else="" 3="">

    using only the select * from emp I get only 10 lines instead of 14 rows.

    Tell him that the report query:

    with emp_rows as (
      select e.*, rownum rn, count(*) over () n from emp e)
    select
      *
    from
      emp_rows
    where
      rn <= case when :request like 'FLOW_EXCEL_OUTPUT%' then n else 10 end
    

    However, I see problems with the requirement. For example, the report of user control can sort? If so, what would happen?

    Why is it necessary to do so?

Maybe you are looking for

  • Why is it so difficult to find the latest version of Firefox?

    There seems to be no place on mozilla.org see easily what is the current version of Firefox. I have to dig through the support questions and answers to find out. If this is kept secret for some reason? THX

  • 15 - n233sl: wifi module replace

    Hello It is possible the replacement of the RTL8188EE communication module? I thought to take an Intel 7260 AC. Concerning Nicola

  • Java works only with windows 7, I think.

    OK I do not know exactly what the problem is, my best guess is that windows 7 is not letting me use whatever it is related to java. I made sure that I had the most current version of java, when download it even said that it is compatible with windows

  • How can I find my password for port locker

    I'm trying to back up files on a USB device, and a window opens asking a password for windows port locker. I don't know the pass wod. Where can I find?

  • Samples buffered not updated in the loop For

    Hello. I'm having some trouble with DAQmx Read. I have 2 cards USB 6509 making a digital output to solve some multiplexers and I want to measure differential voltage using 2 boards of 6255 USB. I have a sample clock shared for 6255 boards through a P