And operator in SQL - are both expressions evaluated if first one is false?

I've a query which is failing and I'm wondering if this has to do anything with the AND operator:
select * from my_table where dt <> 0 and trunc(sysdate) = to_date(dt, 'YYYYMMDD');
dt has been defined as NUMERIC(8). Right now all values are 0 for dt in my_table. The query fails with an error: ORA-01840: input value not long enough for date format.
Is it because both the expressions are being evaluated for AND operator? Or I'm missing something?
Thanks in advance.

Even putting the dt <> 0 condition in a subquery, though, doesn't force Oracle to evaluate that condition first. The optimizer is perfectly free to evaluate the trunc(sysdate) = to_date(dt, 'YYYYMMDD') first if it so desires.
Jonathan Gennick's Subquery Madness article is right on point here.
Justin

Similar Messages

  • My dock and top tool bar are both overlapping how do i return them to normal?

    My dock and top tool bar are both overlapping how do i return them to normal?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, or by corruption of certain system caches. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and  Wi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • When I set up an App Tab the original tab and the App Tab are both there when Firefox opens next time

    When I set up an App Tab the original tab and the App Tab are both there when Firefox opens next time. I have tried saving the current tabs, etc but that doesn't help.

    I had this problem after I installed an update for Java. Firefox also stopped remembering my open tabs from last time. I disabled all of the Java plug-ins, restarted, and it's worked great ever since. Haven't missed Java yet either.

  • I just updated to 5.7 and the exported files are blurry. I compared the ones I exported before the change and they are fine. I have not change any settings.

    I just updated to 5.7 and the exported files are blurry. I compared the ones I exported before the change and they are fine. I have not change any settings.

    I don't understand your last paragraph.
    "The home page also has a full bar ..." What does "full bar" mean? " ... instead of the tray it had before."  What does "tray" mean?
    Anyway, you might try Settings > General > Reset > Reset Home Screen Layout
    I guess that cannot make things any worse.

  • LOCATION CODE FOR BOTH THE C DISK DRIVE AND D RECOVERY DRIVE ARE BOTH 0. WHY?.

    IS THERE INSTALLATION PROBLEM?.INSPITE OF FULL RECOVERY USING BRAND NEW DISCS - WHY?.
    THX. KRIS;

    It means the C: drive and the D: drive are partitions on the 1st drive in the system and the HDD is designated Drive 0.  This has been standard notation for a long. long time.
    You should be discussing this issue with the Technical Support of the computer's manufacturer.  The D: partition is your recovery partition.  The recovery partition is created by the system manufacturer, not by Microsoft or the Windows 7 installation
    disc.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • I have two separate calendars on iCloud (to share with two different groups), but I click on the second and try to enter data, it defaults to the first one I set up. How do I fix this?

    I have one iCloud account. I set up two separate calendars on iCloud to share with two separate groups.  But when I click on the second calendar and try to enter data, it defaults to the first/other calendar (wrong group to share with).  How do I fix this?

    Was this ever resolved? 
    Recently I set up a share for one calendar with another Apple user, through my iCloud.  Now I find that the shared calendar, which has maybe 50 entries a week because it is for keeping track of community center activities and printing out PDFs, appears in my personal Calendar --- unless I turnoff the sharing. 
    Is this generally true?  I cannot find any clarity on this on Apple Support.
    If so, I plan to stop the assistance to the other Apple user.  I will stop sharing the community center calendar that I set up on my computer and ask her to set up such a calendar on her own computer anew.   The sharing of Calendars does not work well.  It seems the shared calendar takes over as the only calendar one can see on one's own computer, replacing other calendars set up without sharing.  I can only "see" the other calendars by turning off the sharing on the shared calendar.   This is inconvenient.  Basically shared Calendars take over!

  • 10.6.4 - QuickTime Player and Quick Look Helper are both crashing

    Since upgrading to 10.6.4, I can't start QuickTime player (it crashes with EXCBADACCESS immediately after launch). In addition, Quick Look Helper also crashes when it tries to preview video files. I'm sure that the two are related.
    It happens both with my account and a guest account.
    Has anybody else seen this?
    The call stack is very short:
    0 com.apple.VideoToolbox 0x00007fff85224982 dyldstubcalloc + 0
    1 com.apple.QuickTimePlayerX 0x00000001000017ab 0x100000000 + 6059
    2 com.apple.Foundation 0x00007fff83b8784e nsnotecallback + 167
    3 com.apple.CoreFoundation 0x00007fff8167ba90 __CFXNotificationPost + 1008
    4 com.apple.CoreFoundation 0x00007fff81668008 _CFXNotificationPostNotification + 200
    5 com.apple.Foundation 0x00007fff83b7e7b8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 101
    6 com.apple.AppKit 0x00007fff80956b45 -[NSApplication finishLaunching] + 243
    7 com.apple.AppKit 0x00007fff80956798 -[NSApplication run] + 80
    8 com.apple.AppKit 0x00007fff8094f5f8 NSApplicationMain + 364
    9 com.apple.QuickTimePlayerX 0x0000000100001514 0x100000000 + 5396

    The combo update fixed. I usually always install the combo, but this time I didn't feel like doing the big download, so I skipped it, and it came back to bite me.
    Message was edited by: RudedogDHC

  • I downloaded i-tunes 8.1 and all I get is announcement for Cloud 10.1, although I can bring up my account, etc.  Am unable to access store.  I cannot use cloud because my i-mac and mac pro laptop are both G 3.  The laptop is intel, the i-mac is not.

    I downloaded -i-tunes 8.1 because both of my computers are G-3; the Mac Pro lap top has intel, my i-mac does not.  When I try to access i-tunes store on the mac pro I get the page for CLOUD.  I can access the account, but am unable to access i-tunes store.  My music is available.  How do I access the store?

    Hello, I'm experiencing the same problem - did you find a way of accessing the store?

  • HT3529 My iPhone and my childrens iPods are both linked to the same Apple ID. unfortunately, iMessages sent to me are now appearing on my childrens screens. Some of which are inappropriate. Please advise how I can rectify this???

    How can I stop the iMessages I recieve to my iPhone showing up on my childrens iPods?
    We all use the same Apple ID and they use iMessage.
    Thanks for your help in advance

    best thing would be to turn imessage off on their device
    also you can go into settings, imessage on theire device, go into send and receive and uncheck your phone number  (on their ipods)  that way if a message is adressed to your phone number, they will not get it

  • How can access my iphone 5 when my home button and my lock button are both broken? Can I turn it on with the volume button?

    Can I set it up so my screen turns on when I change the volume? Can I use something else? PLEASE HELP ME! I already tried to call apple when my screen cracked and they said that they can't do anything about it without charging me at least 200 dollars.

    You can get one for around $50 I think. I know it's expensive, but it's better than paying $200 to Apple.
    If you aren't able to get the case, you can turn it on by plugging it in for just a moment to any power source. You can't turn it on using the volume buttons.

  • I just activated imatch on my windows pc unending vista.  After the match and upload, only matched songs appear on my iPhone and iPad.  Imatch and show all music are both on.  Also, most of my playlists are empty.  Help!

    J

    Same problem on my ipad 2...but it works well on my iphone 4s.
    Can somebody help me?
    Thank you

  • How can I change the color in a search window for visited sites? I'm partially color blind and the default colors are very difficult to tell from one another.

    When I'm looking at a search engine results page, I would like the colors of visited results to be a color that is much more different than they are now. Like blue v.s. black or blue v.s. yellow.

    You can use the NoSquint extension to set font size (text/page zoom) and text color on web pages, including the visit color.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • HT1751 I downloaded my Itunes library from old lap top to my new laptop and all my songs are doubled with a ! by one of the songs. Everytime it is asking to to locate the missing file, how to a get rid of the duplicate song

    I  my Itunes library from old laptop to my new laptop. When I transfered my itunes, they are now doubled in the library, with one song with a ! by it. Everytime I try to play that song it directs my to locate the song and it gives me a drop down menu. How do I end the duplicate songs on my computer?
    Fairwind80

    As long as don't have any metadata attached to the broken files which you would like to preserve...
    You could use iTunes Folder Watch with its option to "check for dead tracks on startup"
    Or
    Robert Jacobson's script itunes_remove_notfound
    Or
    Create a playlist called Found, select everything in Music and drag it into the Found playlist. Create a smart playlist called Lost matching All the rules Playlist is Music and Playlist is not Found. Your lost tracks will be in this playlist. You can delete them all with a Ctrl-A to select them and Shift-Delete to remove them.
    You can then delete the Lost & Found playlists.
    If there are ratings, play counts etc. attached to the broken links, but you've since reimported the files from another location then I have a script called FindTracks that could probably repair the broken links, and another called DeDuper that could dedupe and gather up the stats while preserving playlist membership etc.
    tt2

  • I have an I Mac and Mac Book Pro and want photo stream on both but only permanently on one

    I have an I Mac, Macbook Pro, Ipad, Iphone and ipod touch that under my id and then my son and wife both have Iphones. I want photo streaming on all my devices and my wifes but only want pictures to be permanent on the I Mac. How do I do this

    To make an exact "clone" of the i7 hard drive on the MBP hard drive you could:
    use Target mode to mount the MBP on the i7 (as if it were an external drive) OS X Mavericks: Transfer files between two computers using target disk mode
    use CarbonCopyCloner to make a clone of the i7 on the MBP drive. Mac Backup Software - Carbon Copy Cloner
    It would be easier, however, to just set up file sharing between the two computers, and then they would just have access to each other's files. OS X Mavericks: Share your files
    An even better option is to use some cloud based option for sharing the files, like iCloud Apple - iCloud - Your content. On all your devices.  or Dropbox. Dropbox  Then you could open a file on either Mac, and work on it, and it would sync with the other Mac automatically. You could make changes on a file on one Mac, and then when you open the file on the other Mac the changes would be there. And you could also share files easily with others.

  • HT5527 If I have an IPhone, IPad, and  Macbool Pro That are all synced do I need one icloud for all three or individual iclouds?

    Do all my devices use the same ICloud, or do they each have there own?

    Assuming these are all your personal machines (with no sharing), you should use the same iCloud area to populate each and every machine.  --- One iCloud, as you say.

Maybe you are looking for