What do you do in a query in order to find the 1st day of last month ?

i use a
select trunc(trunc(sysdate,'mon')-1,'mon') from dual;
what about you guys ?

Hi,
Of all the solutions, I like yours
add_months(trunc(sysdate,'mm'),-1)or doing the operations in the opposite order, like Sentinel did
trunc(add_months(sysdate,-1),'mm')best, mainly because:
(1) it's easy to read and understand
(2) it's easy to modify (in case you want the first day from three months ago, or six months in the future)
By the way, after you post something on this forum, if you see that you've made a mistake, you can correct it. Click on the second icon to the left of "Reply". (What is that: a hand holding a pencil?) You don't need to post a second message.

Similar Messages

  • Query to find the fifteenth day of a month

    i want to know the fifteenth day of a month in oracle
    can anyone send the query

    Hi,
    Try this:
    "afiedt.buf" 2 lines, 57 characters
      1* SELECT TO_CHAR(TO_DATE('15-AUG-2006'),'Day') FROM DUAL
    SQL>/
    TO_CHAR(T
    Tuesday
    1 row selected.
    SQL>Regards
    Avinash

  • HT201412 what do you do when your phone numbers no longer have the contact persons name just a number. Also names are missing from the address  book where contacts are.

    what do you do when your phone numbers no longer have the contact persons name just a number. Also names are missing from the address  book where contacts are.

    I, too, love everything about my phone. The other day I tried to crash my Z10 by running multiple apps and having videos running in the background. Do you think my Z10 showed any signs of slowing down? Nothing doing! It ran as smooth as silk. I'm very impressed.
    Cheers.
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • What can be done in our code in order to disable the Link/Hand/Popup actio?

    Hi all,
    We are implementing a process that includes an Adobe Form. This form retrieves some information from our ERP and has some images that represent some executives’ signatures and company’s logo. At runtime, this application seems right, but when you place the mouse over the images a “Hand” appears and a click is possible. If you click over it, a FileSystem PopUp appears and you can choose a new image. What can be done in our code in order to disable the “Link/Hand/Popup” action??
    Regards and Thanks in advance!

    Hi Carlos,
    You can write a script to make it readonly .
    Click on the image element .check the object properties.
    find the bind
    nd u can use the formcalc script to disable action like;
    Event :Initialize
    Script :formcalc
    runat :client
    Subform.image1.access="readOnly"
    Swathi
    Do offer pts:-)

  • Query with the days of a period and the same days of last year

    I need a help.
    We have a sales cube with daily values.
    We have a query that restricts a month (0CALMONTH) and shows the daily values for this month.
    No problem, we have only to put 0CALDAY on the line and the value on the columns.
    But we need also to show the values of the same days from last year.
    Example:
    The restricted month is july/2011.
    0CALDAY is on the line, so the query shows the values for
    01.07.2011   110,00
    02.07.2011   108,00
    31.07.2011   109,00
    How can we show in the same line the values for july/2011 and july/2010?
    Example:
             July/2010    July/2011
    01     95,00            110,00
    02     96,00            108,00
    31    94,00             109,00.
    Thanks in advance
    César Menezes

    Thanks for the answers until now.
    Surely a Day characteristic (ex. CA_DAY, derived from 0CALDAY) would work.
    But we have this requirement in many other cubes (I posted only an example) and it's not feasible to create this characteristic now.
    I understood the other suggestions, but the problem is not on selecting the values.
    We have two restricted key figures, one for a period (filled by the users) and another one for this period - 12.
    They work OK and bring the correct results.
    The problem is on presenting the results, because as we have 0CALDAY in the line the results appear on two different lines.
    Example:
    15.07.2010    950,00
    15.07.2011    980,00.
    Is ther any way to present the results in the same line?
    Example:
    15.07.2011    950,00 (last year)     980,00 (today)
    or
    15.07             950,00 (last year)     980,00 (today)
    or any other way?
    César

  • Trying to pay my bill, could you use the same information from last month

    Trying to pay my bill online, It keep saying wrong cvv, could you just use the same information from last month to pay bill? Haven't anything changed.

    Debit cards are no longer accepted in the iTunes Store, it seems. The current valid payment methods are listed here:
    http://support.apple.com/kb/HT5552
    You can try contacting the iTunes Store and asking if there is any way to use your card, but they probably will tell you that it's not possible.
    http://www.apple.com/emea/support/itunes/contact.html
    Regards.

  • Sent iphone 5 3x for repair ( 1 repair and 2 replacement ) in a span of 2 months.. And i just ask apple care to extend the warranty of my replacement iphone 5 for 6 month, i mean how can you trust the 2nd replacement if the 1st replacement didnt last long

    Sent iphone 5 3x for repair ( 1 repair and 2 replacement ) in a span of 2 months.. And i just ask apple care to extend the warranty of my replacement iphone 5 for 6 month and they reject it,  i mean how can you trust the 2nd replacement if the 1st replacement didnt last even for just 1 month? Really dissapointed!!

    No, really just want to voice out my dissapointments with apple care.. Im just really ****** off..

  • Are you aware that people make thrash apps beginning with the AAA letter just to be the first app you see in AppStore, so its harder to find the true apps with all that thrash?

    Are you aware that people make thrash apps beginning with the AA letter so they can be found before the other good apps? Its now hard to properly scroll the new app with all the thrash.

    Am I aware? Yes. But I am just another Apple user and developer. Is Apple aware? Does Apple care? You need to tell Apple that you are aware and you care by sending feedback: https://www.apple.com/feedback/
    Of course, the fact that Apple doesn't even have a feedback category for the App Store might be some indication of how much they care.

  • What do you do when painting on a layer mask with the correct color dosen't work?

    I have been trying to do some compositing but when i paint with white on a black layer mask or black on a white layer mask, NOTHING HAPPENS.  What should I be looking for?  Is there an adjustment that needs to be set a certain way?  I would also like to know how you open multiple images in one document with each image on it's own layer. Thanks...

    Everything is set correctly... still nothing.
    I want to use a texture and an image.  I have them both in the same document, but the only way to get the texture to allow the image to show through is to reduce the opacity. That's not the look I want.  I tried clipping the two different images together, but then I could only see the photo itself and no texture.  I just don't understand why when I set things correctly they don't work.
    One other question if I may?  Everything, all of a sudden is opening in Preview instead of with PS as it has always been in the past.  I don't recall changing any settings.  What should I look for to make PS my default...
    Oh and one more thing. When I click on Safari photoshop goes missing and Safari shows.  If I click on photoshop then Safari goes missing.  This is INCREDIBLY annoying and I don't know why it's doing that. Both these things started at the same time.  I'm on a Mac.

  • What should you do if your iPod touch isn't playing the songs in your music it's only skipping the songs

    My sister her iPod isn't playing her songs only skipping them what should she do?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • What caused "You need to restart your computer.  Hold down the Power button for several seconds or push the restart button."

    This was displayed in four lanuages.  When I restarted I was asked to submit an error report.  The gave programmer details and indicated my OS 10.4 had quit.  I was reading a news article on DailyMail.co.uk at the time.
    I ran a Sophos antivirus scan on the whole disk and no threats were identified. 
    This has apparently happened a couple times previously.  I thought the computer had not booted up properly since it had a black box where this message appeared and the machine was unresponsive.
    Any suggestsions for cause and/or solution.

    Apple won't work on it anymore. And, take it from me (hard experience: three boards changed and the G5 finally croaked from the graphics chip problem) you don't want to bring it to an AASP either, because if they are able to get a new logic board from Apple, it will croak in short time also. These were not refurbed properly. And, by now, the caps on a refurbed board will be ancient, anyway. In addition, there is a serious potential issue with the graphics chip. There was a repair extension in effect for both issues, the caps and the chip, but it's long since gone.
    There might also be bad caps in the power supply.
    Those three bad caps, and possibly others, are enough to bring this machine down.
    There are some delicate soldering skills involved in replacing the caps. Most people with experience recommend practising first on a disposable board.
    You can get a set of the caps which will fit properly from
    http://jimwarholic.com/2008/07/how-to-repair-apple-imac-g5.php
    There's also badcaps, who I think will work on these.
    http://www.badcaps.net/
    Also have a look at the posts inside these threads from resident expert spudnuty.
    https://discussions.apple.com/thread/2287036?threadID=2287036&tstart=0
    https://discussions.apple.com/message/11896037?messageID=11896037#11896037
    And there are one or two others who will do the repairs. I can't remember right now, but I'll look into it and post here again, probably tomorrow.
    Basically, I don't think you want to put any big money into this.
    EDIT: just remembered another. There was another one located in Oregon and I think he's now out of business.
    http://www.dttservice.com/imacg5.html
    Get the caps and maybe have some local guy work on it.
    Message was edited by: WZZZ

  • HT201441 so, what if you have purchased an iPad mini second hand, and the past owner is not available to contact about allowing use?

    PLEASE HELP! I can't connect it to iTunes either because the iPad is kind of broken

    If you have encountered activation lock, your iPad will be useless unless you can contact the prior owner.  They have to give you the ID and password, or erase it and remove it from their account as explained in the article you were reading.  No one else can help you with this and there is no way around it.

  • What do you advise I do If I am out of the country with a broken phone screen?

    So, the other night I lost grip of my iphone and it landed on the street, smashing the phone screen into a couple hundred pieces. Everything still functions, I am just unable to see the screen perfectly, and there is the constant risk of cutting my fingers. I understand that I can, with applecare coverage, send it in to get it repaired, the issue is that I'm out of the U.S. for 5 more months.
    Is there anything I can possibly do here so that I don't have to pay to ship it all the way back to the states?

    Anne6241 wrote:
    Please help me set up my Verizon IPhone 5, so that I can travel in Ireland without roaming charges.  I have NO service, so did not set up the phone correctly, so really  need your help.  I would like to be able to use wifi and use the phone.
    Without Roaming there is no service.  You need to contact Verizon and determine why there is no service. Most carriers have roaming partnerships with local carriers in other countries. Verizon maybe does not? Or your plan is not setup to automatically Roam?
    If Verizon has none, then you will get no service.
    If you require phone service without roaming, then you need to get a local Sim card for a local carrier to use.
    Note that this sim card will have its own phone number, which will be different to the one you get from Verizon.
    Wifi is independent of Roaming or Cell service.  You can use Wifi even when there is no Service, assuming there is a Wifi router nearby.

  • HT4623 What if you do not have a software update prompt in the general screen...how do you install iOS 5?

    I am trying to download IOS 5.1 on iPad2 but do not have a software upload prompt in the general screen.  How do I upload IOS 5.1 without this prompt?

    Connect the iPad to your computer and launch iTunes, click on the iPad name on the left side under devices and then click on the Summary Tab in the iTunes window on the right. Click on Check for Update. After you install iOS 5 on the iPad, then you can update in the future right from the iPad in the Settings>General>Software Update.
    Make sure that you are running the latest iTunes on your computer before you update the iPad.

  • What do you do when during watching trailers it goes to the main page on your iPad mini?

    When I'm using the iMovie app while watching a trailer that I made ever since I put in the Zaggkeys ini 9 keyboard, it goes to the main screen during a trailer. Please help! I use a iPad mini and the version of the iMovie app is 1.4 (587).

    A reset may help. Tap and hold the Home button and the On/Off button at the same time for approximately 10-15 seconds, until the Apple logo reappears. After the logo reappears, release both buttons and await restart.

Maybe you are looking for

  • How to kill the yellow outline when using setFocus?

    Hi... I tried using: btnname._focusrect = false; It did kill the yellow outline but then I can't navigate using the up/down/right/left key anymore. How to solve this problem? I have been researching days on this. Please help! Thks!

  • Best Method To Organize (move) Messages (many Mailboxes to one)

    I'm working on reorganizing my Mail messages from unique Mailboxes for certain topics (or senders) to having my messages in Mailboxes by year. Then use Smart Mailboxes to view what I need. Before I start moving around a lot of messages, I want to mak

  • Is there a tablet that has similar options as PC?

    I want to buy tablet for my sister ....I would like to know if there is a tablet that is the most similar to a PC , in that ...it should run flash so she can see videos on any website not, or listen to music anywhere not just youtube ...to have same

  • Exclusion of members..

    In the EPM 10NW report, I need to exclude certain entity members from the display. In the 'report editor' I am using the 'Exclude members' option in this regard. These members are excluded from the report display, but still showing up in the hierarch

  • Airport Utility 5.4.2 was unable to find Airport Extreme base station.

    I downloaded the new Airport Utility 5.4.2 to my 2009 24" iMac with Snow Leopard. Now it is unable to find my Airport Extreme base station or Airport Express. My iMac is connected to the network via the Airport Extreme base station but the Airport Ut