Find out more about a month data

Hi team,
I need the query that should return the data from more than a month.
Means that whenever I run the query (today, tomorrow,)), the application should give me the result of more than a month.

The following query is correct!
CREATE TABLE DATE_CHECK
(
  VAL  NUMBER,
  DT   DATE
)

SELECT * FROM 
 DATE_CHECK
         WHERE  TRUNC(dt)  < TRUNC(SYSDATE-30)
Please suggest it's okay, I tried with sample data, it is coming as planned. I wanted to just your suggestions

Hello

Smile says:
Hi team,
I need the query that should return the data from more than a month.
Means that whenever I run the query (today, tomorrow,)), the application should give me the result of more than a month.

The following query is correct!

CREATE TABLE DATE_CHECK
(
VAL  NUMBER,
DT   DATE
)

SELECT * FROM
DATE_CHECK
WHERE  TRUNC(dt)  < TRUNC(SYSDATE-30)

Please suggest it's okay, I tried with sample data, it is coming as planned. I wanted to just your suggestions

It depends on your specific needs.
Not all months are 30 days long. Looking for more lines of 30 days old is a perfectly reasonable thing to do, but it is not the same looking for lines that are older than 1 month (which is also quite reasonable).

Say that you are running the query at 23:30 on 6 June. It will exclude most recent data as 00:00 may 7, which is more than 23 hours old to 30 days. Again once, this is not necessarily an error. It is often desirable to have a query that will return the same results regardless of what time it is executed on a given day and find all fropm lines a day, regardless of the exact time.

It may be more effective if you do not use a function on dt; in other words, write the WHERE clause such that dt is the only one on one side of the inequality operator. This condition

WHERE   dt < TRUNC (SYSDATE - 30)

is equivalent to what you posted.

According to your needs, here's another way to do it:

WHERE   dt  < ADD_MONTHS (SYSDATE, -1)

If you run this at 23:30 on June 6, then it will includes the lines where dt is later than 23:30 May 6, but exclude lines where dt is 23:30 May 6, or even earlier.

All conditions in this message to exclude lines where dt is ZERO.

Published by: Frank Kulash on 6 June 2013 10:23
Example of modified limit.

Tags: Database

Similar Questions

  • What is the way to find out which app is downloading data from the internet?

    Every time I connect to internet, I see that nearly 100 MB of data is is downloaded, without my consent. I did almost all the applications that I know to ask my permission before you download.

    Yet, some applications are downloading data without my consent.
    I would like to know what are the applications that do.

    What is the way to find out which app is downloading data from the internet?

    There is background applications that automatically transfer and receive data when the computer is connected to the internet. Try if there is active apps running.

    1. click Alt + Ctrl + Del to go to start Task Manager / Applications and end unnecessary tasks.

    2. go in Control Panel / programs / uninstall a program and uninstall unwanted programs.

    I hope this helps.

  • How can I find out who created a new data center or virtual?

    Is there a specific log file?  I'm trying to find out who created a new data center and some VM.

    The events are not stored in a file, but are stored in the database of vCenter in the VPX_EVENT table. The creation of a data center is a vim.event.DatacenterCreatedEvent in the EVENT_TYPE column. The user who has created are in the USERNAME column. The name of the data center is in the DATACENTER_NAME column. Time of creation is in the CREATE_TIME column.

    I tried to create and delete a data center and after removing it, I could always find events in the database.

  • Did someone already bought a HP dv9700 Entertainment PC &amp; find out more late it is a model of dv9810us?

    Hello.  Has anyone ever bought a HP dv9700 Entertainment PC to find out later that it is actually a model of dv9810us?

    I bought my laptop as a HP dv9700 Entertainment PC. However, the properties of the system display incorrectly.  The property system indicate that it is a HP dv9700 Entertainment PC like the box your laptop came in; however, sticker service tag on the bottom of sweep of website of the laptop AND my laptop for drivers of HP indicated the model is a dv9810us.  A specialist of the HP Support told me that the models failed to height in the properties of the system due to an error in Imaging, but I'm not sure about this because I'm not familiar with the operation of the "imaging".  I guess it probably has some kind of ini or another file (or something) that tells it what to display system properties.

    Anyway, has everyone except I never bought a laptop to learn later that this is not the model you thought you bought?  I really want to hear from you if this has happened to GOLD if you know why this happened to me.  The only reason I found out that it of because I started having problems with the device and was looking for drivers to download from HP and the pattern does not match.

    Thanks for your time and your answers!

    Have a fantastic day,

    Tammy :-)

    Thanks for letting me know the system information is pulled from the BIOS. However, don't would not support HP on HP Web site scanning detected the correct when model it detected my model as a dv9810us as opposed to the dv9700 shown in my System Info?   It seems that everything points to a dv9810us except the system information.

    Earlier, I noticed that besides the service tag indicating it's a dv9810us, the sticker on the laptop near the keyboard said also that my laptop is a HP Pavilion dv9810us Entertainment PC (instead of HP Pavilion dv9700 Entertainment PC).  It seems that the BIOS must have incorrect information as well.  I've ALWAYS relied on my system information to be correct, but in this case, it is incorrect.

    I still don't understand WHY this happened. The information system has been the same since I bought the laptop but I never had any issues so far, so it didn't matter.  This error/mixup with the model numbers were able to settle the bad sound and drivers QTOSD before I decided to use the Restore Manager feature to try to get this back to factory driver settings.

    Once again, thank you very much to tell me where the information system is shot, but I still don't know why it would be wrong, but it seems not be wrong.

    Good day!

    Tammy

  • Optical drive Blu - ray - XPS 8900 - where can I find out more

    Recently received a XPS 8900 special edition desktop computer. Very happy so far, but there seems to be very limited user information available (the manual is pretty bare bones).

    Am I missing something (calculated limited skills) but I would particularly like to see more details on the optical drive. I tried a DVD blu - ray in there, but he would not play. My understanding is that this reader reads the blu - ray, but will not write to it. It is perhaps the opposite autour?

    Thanks for any help.

    The optical drive is a Blu - ray Combo that reads BD (Blu - ray) and player written on DVD/CD.

    Windows 10 isn't any software built to play the DVD (Blu - ray or digital). So, you will need to find an app that plays DVDs to win 10. There are free and paid apps so do your homework. You can watch this youtube to get advice on a free Blu - ray player.

    I have no experience with Blu - ray apps, so cannot recommend any one, but only to install an application from a reliable source, and don't forget to watch the download does not seek to install a lot of scrap or ad-ware and that you do not want.

  • Looking for help to find articles or resources to learn more about how to migrate to a new computer and also upgrade CS5 to CC at the same time. Can I migrate and then upgrade?

    Looking for help to find articles or resources to learn more about how to migrate to a new computer and also upgrade CS5 to CC at the same time. Should I migrate and upgrade?

    You don't want to think in terms of migration when it comes to Adobe software.  You must install using installation files.  There is no need to have installed CS5 unless you plan to use it.  There is no way to upgrade of CS5 at CC, there is a reduced plan should soon be interrupted.  You get the first annual subscription for almost half of the normal price.

    Creative cloud plans

    https://creative.Adobe.com/plans

    Director of the installation:

    Download/install the desktop application, connect and install applications subscription.

    Creative cloud to desktop
    https://helpx.Adobe.com/creative-cloud/help/creative-cloud-desktop.html

    Sign out, sign in | Creative office cloud app
    http://helpx.Adobe.com/creative-cloud/KB/sign-in-out-creative-cloud-desktop-app.html

    Install, update, or uninstall applications
    http://helpx.Adobe.com/creative-cloud/help/install-apps.html

  • About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    Hi Michael,

    If you want to stop receiving notifications by electronic mail, in the thread, that you have created, then I suggest that you follow the steps below:

    One time connected to the Apple Support communities, visit your mini profile and select manage subscriptions.

    Content

    To manage this content, you are currently subscribed and changing your preferences, select the content.

    Select next to see what content you are currently following.  Note that any thread you are responding you subscribe you automatically to this thread.

    You can select to terminate a subscription to a thread.

    Learn how to manage your subscriptions

    Take care.

  • How can I find out why my iPhone 6 is using data so

    How can I find out why my iPhone 6 is using data so

    What do you mean by data? Do you mean using your your wireless provider data allowance, or hear you storage space for files?

    See how much storage you have used on your iPhone, iPad and iPod touch - Apple-Support - http://support.apple.com/HT201656

  • I have about 14 000 songs in my library, about 4 copies of each of them. Try to remove duplicates, but can only do one at a time. I spent many hours, check all the files I want to delete only to find out that I can't delete them both?

    I have about 14 000 songs in my iTunes library, but really there are only about a quarter as much because there are so many duplicates. I don't know how they got there in the first place, and try to remove them is infuriating! I have already spent several hours going by checking all the files I want to remove (thinking that I would delete then all files at once) - only to find out that I still have to delete them one at a time. There must be a better way! Help, please.

    If you don't know that you want to delete all checked the songs in your library:

    • Create a new smart playlist with the following rules:

      This will show then checked all the songs in your library.
    • Select all the items in this playlist (Ctrl-A)
    • Hold the SHIFT key and press DELETE - follow the prompts to remove songs from your library and (if necessary) your PC media files

    In case of problem, you must back up your library before you do just in case the results are not what you expect - see tips to the user of turingtest2 on your iTunes for Windows with SyncToy to backup library for a suitable and recommended method.

    There is no 'simple' way to reliably remove duplicates from a library, but see the intelligence in this threadon the use of a scripted for removal of duplicates (for example).

    Long-term, try and avoid adding anything in your iTunes library that already exists in it - that's how arise the duplicates (unlike an opinion apparently dispersed, iTunes not of is duplicate anything in normal operation).  I've seen several comments suggesting here a few users to correctly copy their library from an old computer to a new one and then add the content of its media files - guaranteed way to finish with a copy of database entries or media files.

  • Can I find out if I had to buy the Adobe Creative Suite 6 Design &amp; Web Premium, but I subscribed to photography CC for only one month plans, can I unsubscribe it and use the one bought instead?

    Can I find out if I had to buy the Adobe Creative Suite 6 Design & Web Premium, but I subscribed to photography CC for only one month plans, can I unsubscribe it and use the one bought instead?

    I subscribed to the creative cloud only because I did not know that my College courses will be using other software too.

    I hope to unsubscribe to the creative Cloud version and use the purchased instead.

    But if it is not possible, I'll just use the CC version for this year and use the one bought on my other PC.

    Hi, NGOs,

    Yes, if you intend to use CS6, you can still use it after the cancellation of the plan of the CC photography, you can also improve your plan to plan photography to Creative Cloud applications

    If you wish to cancel your plan well photography please contact support by calling/chat for cancellation requests and billing queries:

    https://helpx.Adobe.com/contact.html?step=CCSN_membership-account-payment_cancel-your-memb ership_stillNeedHelp

    * Be sure to stay connected with your Adobe ID before accessing the link above *.

    You can also check the help below document:

    https://helpx.Adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html

    Please go through the Adobe - General conditions of subscription as well.

    He hopes to help!

    Rayyan

  • I bought Photoshop Elements less than a month ago (30 of August), and so I should the conditions required for a free update to 14 items. But I can't find out how to get. Bent

    I bought Photoshop Elements less than a month ago (30 of August), and so I should the conditions required for a free update to 14 items. But I can't find out how to get. Help, please. Bent

    Your purchase is saved in your Adobe account? If Yes, click on the link below.

    When you have all the required information, including the Adobe order number or proof of purchase, click on apply for upgrade, and then click contact us.

    l https://helpx.adobe.com/x-productkb/Policy-Pricing/Upgrade-Policy-Product-Announcement.htm

  • I have updated to DC (about a month) and cannot save my PDF files more.  What is the cause of the dialog box "Save as" do not open?

    I have updated to DC (about a month) and cannot save my PDF files more.  What is the cause of the dialog box "Save as" do not open?

    Hi mwebsterdps-sc,.

    Try this: -.

    The default "Save as" dialog Acrobat DC is different from the dialogue box you had in earlier versions of Acrobat, it also allows you to record in the clouds and previous locations that you saved the files. It is possible that when Acrobat tries to connect to the 'cloud', it runs into problems. You can try to disable this feature to see if this brings your backup in the back of the box: open Acrobat Edit menu access-> Preferences, then go to the "General" category and uncheck "show the online storage when you save files:

    I would like to know if it works.

    Kind regards
    Nicos

  • Find County/VMs with 2 or more VMDK on different data warehouses

    Hello:

    I wonder how to find (and later) all VMs with 2 or more on the different data store VMDK...

    Thank you

    qwert

    Argh, you can still see that the single line in my script that I did not test, the Export-CSV cmdlet, gives you bad. The following script, I tried from the beginning to the end and gives even better output:

    $report = @()
    $allvms = Get-VM
    foreach ($vm in $allvms) {
         $clusterName = ($vm | Get-Cluster).Name
         $dstores = $vm | Get-Datastore
         foreach($ds in $dstores){
              $row = "" | select VMNAME, DATASTORE, Cluster
              $row.VMNAME = $vm.name
              $row.DATASTORE = $ds.Name
              $row.Cluster = $clusterName
              $report += $row
         }
    }
    $report | `
    Sort-Object -Property VMName,Datastore -Unique | `
    Group-Object -Property VMName | `
    Where-Object { $_.Count -gt 1 } | `
    Foreach-Object {
         foreach ($Record in $_.Group) {$Record }
    } | `
    Export-Csv "C:\VM_DS.csv" -NoTypeInformation
    

    Update: I saw that the first line was missing, so I added the first line of the script.

    Post edited by: RvdNieuwendijk

  • Conditional formatting date column based on "more than six months.

    Hello:
    I would like to add a conditional formatting to a column where all dates 'Date modified' more than 6 months, appear in red. I guess I have to work in a 'today' feature but I don't know how.

    Thank you-

    Charlie EPEs
    Buffalo, NY

    Use TimestampDiff (SQL_TSI_MONTH, LAST_MODIFIED_DATE, CURRENT_DATE) to get the difference... check if it is longer than 6 months... and apply conditional formatting
    Current_date give you the date of the day
    refer
    http://oraclebizint.WordPress.com/2008/03/12/Oracle-BI-EE-101332-conditional-formatting-based-on-multiple-columns/

  • More than 1 month and always waiting for out of stock keyboard SL410 + Win7)

    Hey I'm worried that the SL410 has a manufacturing defect in the keyboard. When I hit h I hu if I typed w I get \w. This question of strike fault is not present while typing on the keyboard. I'm also waiting on a keyboard of stock since 12/04/10 more than a month. I am so disappointed by the performance of this thinkpad. Also disappointed by the s/h in the replacement keyboard. I have to call, in the request, a service representative customer to help me with my case given the length of time that I've been waiting for my replacement keyboard.

    Hi Peter,.

    Thank you for following it upwards.

    The keyboard has finally arrived for a month and a half after the opening of the issue. When I replaced it, however, the problem persisted - which means there is a whole new motherboard. So this is a note for anyone who reads this thread with a similar problem on a SL410 - it's a motherboard problem, not a keyboard.

    Who had another week to arrive and the laptop is finally usable.

    Overall, it was a very disappointing experience with support from Lenovo. I don't know if it's just the SL range or a sign of things with org Lenovo support in general.

    -Leo

Maybe you are looking for

  • Signal not detected on Satellite Pro 6100 wireless

    I have two laptops Satellite Pro 6100, two of them are configured to automatically connect to our local wireless router which they both started.A computer is used by myself by my wife; bookmarks, email accounts and so on are different on every comput

  • Reset control

    How can I reset the default controls when I stop the program execution (with the button to give up the running, or stopping on the front panel)?

  • Problems of manually reload Firmware

    Symptoms: Bad titles etc. and computer not recognize my MP3 Sansa 280 From other assignments... I joined the MP3 into recovery mode and downloaded the firmware Version 1.  I tried to copy it to 16 MB-FORMAT unit (file) twice, but for some reason, he

  • laptop HP pavilion dv6446us XP

    I have a pavilion dv6446us laptop PC with a processor intel centrino duo core cpu and two gigabytes of ram and it has a drive sata hard, how do I install xp on it and re-install the sata drivers for (I don't have a floppy and floppy drive) and I don'

  • Error Application Netflix in Windows Media Center when you search

    The Netflix in Windows Media Center Extender works for me but very recently the ability to search other titles give me an error dialogue box titled: text of The Application error : there is a problem with the application at this time. Try again later