'=' with to_date function fails to get results

I have the table for more visits. my table has two fields survey_id (number) and visit_date (date).

the visit_date also contain the time visiting hh.

When I query the table to find information for a day and using the following qyery:

Select survey_id, visit_date

from my_table

where visit_date = to_date('26/04/2010','DD/MM/YYYY');

Therefore, no data found

but when I used another query such as

Select survey_id, visit_date

from my_table

where visit_date > to_date('25/04/2010','DD/MM/YYYY');

There are records to date 26/04/2010.

In other words, always when I query the table for a day using

visit_date = to_date(:my_date,'DD/mm/YYYY');

There is data in the table, I think there is problem of hh in the field of visit_date

Oracle stores dates in digital form (I think 9-digit) format that includes both.

When you use the operator = with a truncated string, it assumes zeros for the time elements.

If your first query is looking for visits that have been at exactly midnight.

Your options are to use the trunc function as suggested or use the syntax "between".

Tags: Database

Similar Questions

  • using = with to_date function fails to get results

    Hi all
    I have the table for more visits. my table has two fields survey_id (number) and visit_date (date).
    the visit_date also contain the time visiting hh.
    When I query the table to find information for a day and using the following qyery:
    Select survey_id, visit_date
    from my_table
    where visit_date = to_date('26/04/2010','DD/MM/YYYY');
    Therefore, no data found
    but when I used another query such as
    Select survey_id, visit_date
    from my_table
    where visit_date > to_date('25/04/2010','DD/MM/YYYY');
    There are records to date 26/04/2010.
    In other words, always when I query the table for a day using
    visit_date = to_date(:my_date,'DD/mm/YYYY');
    Although there is data in the table, there is no return data.
    is the problem because the time HH exisits visit_date field.
    any help please.

    Published by: M.Jabr on May 5, 2010 06:12

    Hello

    M.Jabr wrote:
    is the problem because the time HH exisits visit_date field.

    Yes.

    Use the TRUNC function to eliminate the part of hour:

    trunc(visit_date) = to_date('26/04/2010','DD/MM/YYYY')
    
  • How to deal with the error "failed to get the kernel function pointer".

    I was running smoothly first Pro CC all day today. I stopped at the end of the day and now when I try to launch first yet, only a few hours later, the program will not open and I get the error "unable to get the kernel function pointer.  Help!

    I run first on a Macbook pro i5 processor at 2.3 Ghz with 16 GB RAM, graphic card 512 MB intel HD 3000 running OS 10.10.3.  It worked well (although sometimes a little slowly) for one year. I keep the project file on the portable hard drive, media files on a port firewire 800 Gdrive.  It has been working well.

    The only thing that happened between the first success today and refusal to open the first tonight, I ran something of card/holiday calendar interactive multimedia for my son that I had installed a few days ago but not yet opened. When he installed Abobe AIR opened and did the installation.  To see if this can help, I uninstalled the holiday card and rebooted the computer a couple of times. No dice.

    Help!  Luke

    I have the same problem on several machines. What seems to be the case is first is losing track hence basic audio filters are on the system. The only solution that works for me is uninstalling first, then put it back. I found myself to do this every day or almost.

  • get a single result with analytical functions

    SELECT delrazjn. TYPE, delrazjn. DATE, delrazjn. USER, delrazjn. The IID OF the ZKET_DR delraz, ZKET_DR_JN delrazjn
    WHERE delraz. IID = delrazjn. IID
    AND (delrazjn. TYPE = 'UP2' GOLD delrazjn. TYPE = 'An increase in 1') AND delrazjn. IID_N IS NOT NULL

    This is an example of my sql. But there is more than one result of delrazjn. IID. How can I get the first enterd in DB and ignore others, there will only be one result and no more.
    The first result came in, that I can see for delrazjn. DATE.

    I try to do that with analytical functions, but without success.

    You're right, I told you that I can't test the code.

    I hope this works now:

    SELECT delrazjn.TYPE, delrazjn.DATE, delrazjn.USER, delrazjn.IID
    FROM ZKET_DR delraz, ZKET_DR_JN delrazjn
    WHERE delraz.IID = delrazjn.IID
    AND (delrazjn.TYPE = 'UP2' OR delrazjn.TYPE = 'UP1') AND delrazjn.IID_N IS NOT NULL
    and delrazjn.date=(select min(d.date) from ZKET_DR_JN d where d.type=delrazjn.type and d.user=delrazjn.user)
    
  • Kalonline-works until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking

    I play kalonline (RPG game), when to start the game it works up until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking. the program stops. I am the admin of it say kal computer run it in administrator mode and I did and I delete and reinstall the game. Solve the problem in win 7 by a right click and run as administrator, they wanted to work in win xp it all fits on how to solve this problem. These are the things, I was told to do to fix it.
    Hello

    It comes to KalOnline.

    Your error message can be corrected by following these steps:

    1. run KalOnline in Administrator Mode.

    2 uninstall KalOnline d_lete the entire Inixsoft folder, then reinstall the game.
    I did it and and it has not worked. then I was told that this was causing the problem

    Please check your computer system.

    This problem has occurred by a kind of problem of piracy.

    And if you have used a kind of memory-editing program, it could be happen too.

    So if your receipt similar to, then please remove it.
    I have none of these things on my computer. All I know is that people who have not updated windows xp can play the game and people who win 7 can play the game if they right click icon and run as administrator, that I still say side here but no way to prove it.

    Hello

    I suggest you to get in touch with the manufacturer of games and see if there are any other fix for this problem.

  • Fix it fails Center with the error: unable to get the catalog of the troubleshooter. Error MatsGetSapCatalog failed

    Original title: Fix it center fails.

    Difficulty Center fails with the error:
    Unable to get the catalog of the troubleshooter. Error MatsGetSapCatalog failed
    I can't find the url of re - download.
    It doesn't seem to be at the Download Center.
    Thank you
    Frank C

    Vista Ultimate 64 bit sp2

    CF. http://answers.microsoft.com/en-us/protect/forum/mse-protect_scanning/scanning-engine-has-stopped-responding/e0f84bec-2555-4279-bfb7-aff691b8ba8d

  • last buy and pay creative photography plan cloud. When I open lightroom I get a warning message indicating that Lightroom will open with reduced functionality, you get a subscription to continue using lightroom. But I already bought! I do not k

    last buy and pay creative photography plan cloud. When I open lightroom I get a warning message indicating that Lightroom will open with reduced functionality, you get a subscription to continue using lightroom. But I already bought! I don't know what to do! In his time, that was my trial, which appears as outdated... Can someone help me? Thank you!

    Please see:

    FAQ: What should I do if I have a subscription, but my application acts as if I had a trial?

    It would be a good idea to also check your system against the minimum requirements:

    FAQ: What are the system requirements for the desktop creative cloud application and every creative application of Cloud?

  • Tecra M5 fails to get an IP with the Orange Livebox

    I have a new Toshiba Tecra M5 notebook.
    When I try to connect to my Orange Livebox wireless, he manages to connect but fails to get an IP address.
    I spent the days to try.

    I followed previous assignments on it, but no one seems to have posted a definitive answer. I tried update driver lan wireless etc but got nowhere.

    Someone please help before I go nuts.

    and check if the new version of the driver Wlan is available to use the Intel 2200 b/g card and this work after driver update

  • Problem of Sync of Smartphones from blackBerry - OpenFolder function failed

    I downloaded the Desktop Manager Version 4.6.0.12.  While trying to synchronize with 8320, I received an error message - intellisync "OpenFolder function failed" and nothing had synchronized.  How I overcome this problem?

    In addition, I would also like to know why the function to 'reconcile the messages' is not available in the Fund Manager and how I could reconcile messages from Outlook2007 to my unit so that all emails remain on the device and Outlook. Currently, I only get emails delivered to my blackberry only when my Outlook is closed.

    I am currently using the BIS.

    Thank you!

    OK giye that a test, restart and try DM

    http://www.BlackBerry.com/BTSC/search.do?cmd=displayKC&docType=kc&externalId=KB11703&sliceId=SAL_Pub...

  • com.sun.messaging.jmq.admin.apps.broker.BrokerCmd failed to get the exit code of the child.

    I use D:\MessageQueue4_5\mq\bin\imqcmd.exe to get heads of JMS queues. In most of the facilities, I can retrieve the results without problem.

    At a single facility, however, I get an error when you try to run this command. Called with no arguments, it should display a list of available commands. But that's what I get instead:

    D:\utilities\imqChk > d:\MessageQueue4_5\mq\bin\imqcmd.exe

    Boot process failed.

    Could not run

    Java

    -cp

    d:\MessageQueue4_5\mq\lib\imqadmin.jar;

    d:\MessageQueue4_5\mq\lib\fscontext.jar

    -Dimq.home=d:\MessageQueue4_5\mq

    -Dimq.etchome=d:\MessageQueue4_5\mq\... \etc\mq

    com.sun.messaging.jmq.admin.apps.broker.BrokerCmd failed to get the exit code of the child.

    Other info:

    • Java is installed (version 1.7.0_17).
    • QBrowser using, I can sign in successfully and retrieve information from queue.
    • All of the named files and jar files are where they are supposed to be within the meaning of the doce above.

    I was not able to locate the source of the problem. Any ideas would be greatly appreciated.

    Thank you.

    I had this same problem and solved by editing the file \glassfish3\mq\etc\imqenv.conf manually by setting IMQ_DEFAULT_JAVAHOME as follows:

    IMQ_DEFAULT_JAVAHOME = / Files/Java/jdk1.7.0_45 program

    Note the orientation of the slash. It's on Windows, and when I used with Windows style slash escape sequence, it does not solve this problem only when I used the mangled Unix style done.

    Hope this helps,

    -Noah

  • Question about to_date() function?

    Hello
    I have a question about the to_date() function.
    I am aware that for the to_date() function, we should give the format of the input string.
    My current settings for the NLS_DATE_FORMAT parameter in the NLS_SESSION_PARAMETERS table is "DD-MON-YY."
    Then, when I give
    SELECT TO_DATE('15-DEC-2008','DD/MM/YY') it should error out because the format is not same as the format of the input string('DD-MON-YY').
    But this isn't any error out.why?
    Also please tell me if the format of SYSDATE is taken NLS_SESSION_PARAMETERS table or another table.

    Please take a look at Unexpected result with to_date

  • I can't reach some websites with any browser. I get the message ERR_CONNECTION_REFUSED. If I boot in safe mode I don't have the issue. I tried the reset and repair of everything. Help, please

    I can't reach some websites with any browser. I get the message ERR_CONNECTION_REFUSED. If I boot in safe mode I don't have the issue. I tried the reset and repair of everything. Help, please

    Try to run this program in your usual account, then copy and paste the result in a response. The program was created by Etresoft, a regular contributor.  Use please copy and paste the screenshots can be difficult to read. On the screen with the Options, please open Options and tick the boxes in the bottom 2 before the race. Click on the button "Report share" in the toolbar, select "Copy to Clipboard" and then paste into a response. This will show what is running on your computer. No personal information is shown.

    Etrecheck - Information System

  • Failed to get the status of printer/bizhub Konica Minolta C654e

    Failed to get the status of printer/bizhub Konica Minolta C654e

    Cannot print from my Mac.

    With the limited information you supplied I would check the configuration of the print queue. If you open information system (located under Applications > utilities), you will see a column on the left and if you select printers the right pane displays the print queue information. Note If you have multiple printers, you can select in the right upper pane to view its information in the bottom right pane. Can you copy this information and paste it here.

  • AppleScript Error-1728 - failed to get document 1

    I'm trying to find out why my AppleScripts I use for automation of numbers do not work this month.

    I have several scripts that I built for the treatment of the expenditure reports and I ran them last time in February with no problems.  Whenever I now them I get the following error message:

    error "Numbers had an error: failed to get document 1." the document number-1728 1

    I looked at this post: https://discussions.apple.com/message/29854515#29854515

    I have not found the cache file listed in the directory of ~/Library/Caches... ask yourself where the hell numbers may be sticking this file in order to remove it and see if this solves my problem.

    All I have this problem or knows where I could find the file cache for numbers?

    Thank you

    Rich

    To solve this problem...

    I had to remove the container file to ~/Library/Containers/com.apple.iWork.Numbers and my scripts are back and working again!

  • When you use the search bar, it is possible to get results of the search in a new tab?

    In the old Google toolbar, it was possible to display the search results in a new tab, Google toolbar is compatible with Firefox 7, so I have to use the Firefox search bar. However, he always gets results the research in the current tab. Can this be changed?

    Yes. Open a new tab and type or paste Subject: config in the address bar, press enter and press ENTER again to override the warning. Then stick browser.search.openintab in the filter area that shows, and then double-click the browser.search.openintab to activate (it will switch to "BOLD").

    If you had rather an add-on simply do the above for you and add a menu option for it, try this:
    https://addons.Mozilla.org/firefox/addon/searchOnTab/

    You can also type a search in the search bar and press on alt + enter in instead of just enter to open your search in a new tab.

Maybe you are looking for