The Date and case number

Hello gurus / experts of PL/SQL,.

After execuing the request I do not receive the correct values and the cause of the problem is.

sum (CASE WHEN TO_NUMBER (SUBSTR(date,1,4)) = 2011 SO AMT END) lastYrtotal_amount,

Here's my intension to total with a case condition where year = 2011 field date. Date field is to have from YYYYMMDD format, so I extract the first four numbers and compare it to the 2011.

But the values are coming in empty.

Kindly help.. If I do something wrong?

Thank you in advance for your time and effort.

user555994 wrote:
I wish that you are are very good.

It is logical that the amount will be null.
It's what you do

select ...
        sum(CASE WHEN d.date_dim_key between 20110000 and 20119999 THEN atdf.Tag_Trd_Amt END) lastYrtotal_amount,
from ...
where ...
                AND d.date_dim_key BETWEEN 20120101 AND 20120822
...
group by d.date_dim_key ...

You see the potential problem?

Published by: Sven w. on August 24, 2012 11:42

Edited by: group by to view another question added Sven W. on August 24, 2012 11:44

Tags: Database

Similar Questions

  • THE DATE AND PAGE NUMBER OF

    I just finished printing Firefox instructions on how to clear the cache. On the bottom of my page, I noticed that the date and time of the day does not appear on the lower right corner. Also the page numbers are not also appear.

    Hello!
    Would you take a look at the article "How to print web pages in Firefox" - in particular the section on the settings for the headers and footers can be important in this case:
    http://MZL.la/1RKOR0T

  • Automatically set to the Date and time does not

    Date and time settings on my iPad Air set them automatically does not work? When I turn it out it will allow me to choose a city (Knoxville).

    When I turn it on with (location settings) it just turns and turns?

    Any ideas?

    Hello and welcome to Apple Support communities,

    This problem may be caused by a number of things, most often the cause is the device not being able to contact the time server. Here are the instructions from Apple supported for this problem, as well as a link to the appropriate article.

    Follow these steps, after each step:

    1. Make sure you have the latest version of iOS.
    2. Automatically turn on set in settings > general > Date & time. This will automatically put your date and time based on your time zone.
    3. Make sure that your time zone is set correctly. Tap Settings > general > Date & time > time zone.

    If you still have any questions affecting your date, time, or time zone, you can automatically disable in the settings > general > Date & time and manually set the time and time zone. Or contact your carrier.

    The option to enable the value automatically may not be available in all countries or all shells.

    If the time on your iOS device does not go after a sync with your computer, the computer may be time wrong. Check the time on your computer in system preferences > Date & time. You can select "Set date and time automatically."

    Support the Article HT203483

    Get help with the date and time on your iPhone, iPad and iPod touch - Apple Support

    Of course, if the time of your carrier server cannot connect the other option is to manually set the date and time until the carrier server are again available.

    Hope you helps out.

    Kind regards

    Peter.

  • The date and time does not work.

    I have an iphone 5 c.

    The date and time does not work. This is the second time.  The first time was about 3 to 4 months again and now again after upgrade to iOs9.3.1.

    Even after trying to change it manually, time slows down or stops.

    Everyone has problems with their date and time?

    • Try a forced reboot: hold down the House and on the buttons until the unit turns off. Ignore the cursor off if it appears. Once completed, if it does not start on it own, turn off power with the key On. In some cases, it also contributes to double click the Home button and close all applications before restarting.
    • Restore factory settings (no backup)
    • Make an appointment at your local Apple store to have it checked.
  • Tecra M5 does not record the date and time - battery RTC or CMOS checksum is inconsistent

    My Tecra M5 PTM50E reverend new does not record the date and time. I loaded RTC battery for 8 hours when electricity is on in the said user's manual. I don't know where is the problem. The BIOS settings are respect after power is on.

    When I change any value in the BIOS, the changes are saved properly but date & time system restored to their value 01/01/2000, 00:00 every time when I get out of turning off more of 2-3 min. Message "RTC battery is low or CMOS checksum is inconsistent.

    Press [F1] to set Date/time"does not appear when I power on the computer. Any suggestions?

    Hi guys

    Usually this problem appears only if the CMOS (real time clock) battery is empty or corrupted.
    The real time clock battery powers the internal clock in real time and calendar. It also maintains the system configuration. If the RTC battery is completely discharged, the system loses these data and the real-time clock. In this case, the message RTC battery is low or CMOS checksum is inconsistent appears.

    So I see only two possibilities:
    Either you will charge the battery for real-time clock, or you ask the technician for replacement.

    Generally, the battery must be completely charged after 8-9 hoers but try to connect the laptop to the power adapter for a long time.
    If it will not help solve the problem if you contact the ASP for the RTC battery replacement.

  • My HP Officejet 4630e all-in-one does not print the date and time on the fax header

    I followed all the instructions of configuration / Date and time are set correctly but only name and phone number show on the fax header when sending fax.  How can I get the date and time to print as well?

    Thank you for your help

    Hi doggynut4,

    Welcome to the HP Support forums.  I understand that you want to add the date and time to your fax header.

    Your user guide indicates that only the name and fax number can be entered for the fax header (found on page 49). I even confirmed this on my Officejet 4630.  I apologise for any inconvenience this may cause.

    User's Guide e-All-in-One Series Officejet 4630

  • How remove the date and time in image logging vision express

    I use express vision to capture a set number of images with the inline processing. I am opting to save images to a specified folder. However, the file names of the images have the date and time added by default. Is there a way to remove the date and time in the image file name? Help, please.

    Thank you very much. This has been useful. However I found another book about - I renamed it (using the movement vi) slam post files. Still, I would be interested if anyone has a better way to do it.

  • Adjust the Date and time on the HP LaserJet MFP M127fn Pro?

    Hello

    Someone knows how to change the time on a LaserJet MFP M127fn Pro?

    Thanks in advance!

    Sean

    .

    Hi @SeanKaneFLA ,

    I see by your post that you would like to know how to change the date and time on the printer. I would like to help you today.

    This information was given by the manual on page 45. MFP LASERJET PRO.

    You may have configured these settings when you installed the software. You can configure these settings
    at any time by using the control of product or the HP Fax Setup Wizard panel.

    LCD control panel:
    1. on the product control panel, press the Setup button.
    2. Select the System Configuration and then select Date/time.
    3. Select the clock in 12-hour or 24-hour format.
    4. use the keypad to enter the current time and press the OK button.
    5 Select the date format.
    6 use the keypad to enter the current date and then press the OK button.
    7. Select Fax Setup, and then click Fax header.
    8 use the keypad to enter your fax number and press the OK button.
    NOTE: The maximum number of characters for the fax number is 20.
    9. use the keyboard to enter your company name or header and press the OK button.
    NOTE: The maximum number of characters for the fax header is 40.

    (Windows) HP Fax Setup Wizard

    1. click on start and then click programs.
    2. click HP, click the name of the product, and then click Fax Configuration Wizard.
    3. follow the on-screen instructions to configure fax settings.

    I hope this helps.

    Good day!
    Thank you.

  • Need to reset the date and time

    My system has decided that it is Jan.4th 2004 and everytime I turn it on, I need to reset the date and time. How can I cure this?

    Packard Bell's Web site does not recognize the 'ALT' CO2 as a model.  Despite this, however, PB seems only to provide a 'generic user guide"which is not described the replacement of the motherboard or the battery at all.  In fact, the only thing he has to say about batteries is be careful how get rid you of them.

    Your computer is a laptop or Desktop/Tower computer?

    If you have a desktop/Tower computer, you can look here--> http://www.uktsupport.co.uk/pb/mb/pbmb.htm and see if you can identify the motherboard used in your computer.

    However, if you have a desktop/Tower computer, the best thing to do is to unplug your computer from the network and, taking the precautions perfectly static electricity, open the box and inspect the motherboard yourself.

    A newish mother on the above site, http://www.uktsupport.co.uk/pb/mb/cosmos.htm, shows the battery on the center line vertical and more to the left.  It's just below the 3 PCI slots.  If you have something like that, a Visual inspection should be enough to see how to remove it.  The type of battery will be engraved on the top of the battery.  In the photo, it looks like a model CR-2032, but there are several models of battery on this size.  Battery CR-2032 (or equivalent) is available in almost every pharmacy chain in the United States as well as online and stores like Radio Shack.

    The page for an old motherboard, http://www.uktsupport.co.uk/pb/mb/450.htm, indicates that the battery is a '3.0V DC Lithium soldered to the motherboard"and if that were the case, it would probably be something that you wouldn't do yourself.  However, this thread is to think that all you have to do for this particular mobo is actually finding the right type of support plug-and - battery.

    If you have a laptop, things can get quite a bit more difficult.  If you can find a different model for your computer name, you may be able to find the manual here--> http://tim.id.au/laptops/packardbell/ , but some of these manuals can not explain clearly how to get to the CMOS battery.

  • Application of F1 / reset the date and time

    OK could not hang out long so here my problem feel free to move it if you must.

    Hi everyone I'm new here and I'm looking for the answer to what should be a simple question, but I can't find the answer, anywhere, not even after much research on the internet.

    My problem.  I woke up in a constant demand press F1 at the start and I had to constantly reset the date and time. A friend told me that he knew the solution and he replaced the battery Cmos and during one period of time applications of F1 and the need to reset the date and time on start arrested. Then, after a few weeks the F1 ask on startup and delivery to reset the date and time again.

    The situation at the present time, is that I replaced battery comos with the same type and the F1 started queries rearrested again. But once again after a few weeks the demand of the f1 and the need to reset the date and the tooth is distributed.

    I wonder if my friend used the bad battery when he replaced everything first, can someone out there please tell me the correct Cmos battery number and size, I need to motherboard below.

    Acer Apaire E380-CB7L mother board HT 2000 MCP6PM - Re3v:1.0 AM A what is battery correct Cmos?

    I found my answer in a response to another thread. It seems that some how the bad battery had been mounted and in my ignorance of this I still once mounted battery hurt it then compounded the problem further.

    It seems that the CMOS battery on the motherboard usually is a CR 2032 3V , I now nested together for my MB. I'll let you know if it works.

    BTW thanks to the person who advises I took on it.

  • Must DSL be connected all the time to the date and time of synchronization?

    Sometimes I disconnect my DSL lines in case of bad weather.  What's causing my date and time on the computer clock to stop?  I have not had this problem before and have disconnected the front DSL.  If this could have something to do with a switch recently to Security Essentials?

    Sometimes I disconnect my DSL lines in case of bad weather.  What's causing my date and time on the computer clock to stop?  I have not had this problem before and have disconnected the front DSL.  If this could have something to do with a switch recently to Security Essentials?

    Disconnect it won't cause the date and time to stop, but it will not synchronize the period that it is disconnected.

    In addition, please note that diconnecting just the telephone line during bad weather is not enough. If you want to protect you during storms (other types of weather do not require protection), you should unplug both the phone line * and * power cord. Be possible to route a severe surge suddenly lightning nearby for your computer

  • How can I print my photos displaying the date and time stamp

    I have pictures in a legal context but do not understand how to print them displaying the date and time stamp.  The timbre of the date and time are necessary for me to present my case exactly.  Can someone tell me how to print with these marks.

    Thank you

    The following instructions will prepare photos
    with the EXIF Date/time stamp then you can print
    them.

    FastStone Image Viewer freeware can add
    EXIF Date/time in the face of your photos in a batch.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    FastStone Image Viewer
    http://www.FastStone.org/FSViewerDetail.htm
    (Windows XP / Vista / 7)

    I suggest that you create a new folder and add
    copies of your photos for experimental purposes.
    If you are unhappy with the result your originals
    will be intact.

    After FastStone is downloaded and installed...
    Open the program and go...

    Tools / open the Batch Conversion / tab Batch convert...

    Check the box... Use of advanced options...

    Advanced Options button / tab text.
    Check the box... Add text...

    (You will need to experiment with the position and the police
    size and color to get the desired result.)
    (the text size will need to be adjusted according to the)
    the size of the photos)

    Open the window drop... "Insert a Variable."
    choose... EXIF Date Time / Date and time...
    (in the white field you should see ($H1)
    Left click... Ok

    On the Batch tab convert... in the left field...
    Left click the square button "select the Source folder.
    Find and select the photos you want to
    Add.

    Left, click on the Add button to move the files to
    the right field.

    Choose an output Format...

    Choose an output folder...

    Click on the button convert...

    It's much easier to do than to explain then
    give it a try before say you "Good Grief... it's too
    a lot of work.

  • How do I set the date and time for those?

    Windows Vista; all the time that the I shoot my computer automatically go back to the year 2001; so whenever the I put on the computer I need to set up the date and time;  With the help of Windows, after the< is="" an="" error="">, but did not mention the number or how to fix it, please help

    Hello

    If after having set the time/Date and stop and restart your machine the time means the 2001 2007 2009 year ETC, you have a CMOS battery has failed in the motherboard.

    They cost about $5 and are easy to replace.

    How to replace a CMOS battery.

    http://www.computerhope.com/issues/ch000239.htm

    See you soon.

  • Why the date and time is wrong when I start my computer

    Why the date and time is wrong when I start my computer

    CMOS battery die/of - usually about the size of a quarter on the motherboard of your system.

    It keeps things when you are not using the computer - if it starts to die/dies - then the time is no longer maintained.  Replacing, it is no different (in most cases) that replace the batteries of your TV remote or FOB car key.

  • Date and time shows the process of judgment up to the date and time

    I am expierencing problems with my date and time

    as my date and time always shows the shutdown to same-time process

    This is another type of problem, with which I am unfamiliar as if it were a CMOS battery error then the Date and time reset default

    but in my case, it is capable of stalling but starts after the power of the PC and stops time when I turned off the PC

    Solved by changing the CMOS battery...

Maybe you are looking for