Using = with to_date function fails to get the results

Hello ALl,
I have table for visits information. my table has two fields survey_id (Number) and visit_date(date).
the visit_date also contain the visit time HH:MI:SS.
when I query the table to find the information for one 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');
The result is 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 some records in date 26/04/2010.
In other words, always when I query the table for one day using
visit_date=to_date(:my_date,'DD/MM/YYYY');
there is no data returned although there is data in the table.
is the problem because the time HH:MI:SS exisits in visit_date field.
any help please.
Edited by: M.Jabr on May 5, 2010 6:12 AM

Oracle stores dates as a numeric (I think 9 digit) format which includes the time.
When you use the = operator with a truncated string, it assumes zeros for the time elements.
So your first query is looking for visits which were at exactly midnight.
So your options are to use the trunc function as suggested or to use the 'between' syntax.

Similar Messages

  • I bught a new Time Capsule 2Tb. I connected it to my internet router. I manege to set it up as base station but when i try to use it with time machine I always get the message "Check your IP addres"? What am I doing wrong? On my computer I have OSX 10.7.5

    I bought a new Time Capsule 2Tb. I connected it to my internet router. I manage to set it up as base station but when i try to use it with time machine I always get the message "Check your IP addres"? What am I doing wrong? On my computer I have OSX 10.7.5

    What IP address does the TC have and what IP does the computer have?
    We need more info as we really have no idea what your network looks like.
    Modem router, model, type of broadband?
    TC setup as bridge or router?
    Is the computer getting internet via the TC?
    Are you using wireless or ethernet?
    Have you set IPv6 correctly to local link in the computer on whichever network client is doing the connection?
    Did this work the first time for backup and has now failed? If so simply reboot the TC. It is a constant bug that the TC is lost to the network.

  • Why can't I use WebCT chat with my computer?  I get the 'spiral of death' every time I try to type in my chat.  I have a feeling it has to do with compatibility issues between Java and Tiger.

    Why can't I use WebCT chat with my computer?  I get the 'spiral of death' every time I try to type in my chat.  I have a feeling it has to do with compatibility issues between Java and Tiger.

    Hi Elizabeth,
    Do your Mac meet any of these requirements?
    http://www.wvnet.edu/services/webct/requirements.html
    From this it appears to be PC only!???
    http://sourceforge.net/projects/awebctcclient/files/Pancake%20%28it%20own%20proj ect%20now%29/Pancake%20Console%20V1.0.0/PancakeConsole-1.0.0-src.zip/download
    Can you provide any more info on which bersion or file you have?
    Can you tell us why you need this for your use?

  • Using function 'read_text' to get the Material PO Text in  Purchase Order

    Hello,
    i am using this function READ_TEXT to get the Material PO Text of a PO.
    concatenate ekko-ebeln ekpo-EBELP into txt.
    CALL FUNCTION 'READ_TEXT'                " FM Read_text
          EXPORTING
               ID       = 'F03'
               LANGUAGE = 'E'
               NAME     = txt
               OBJECT   = 'EKPO'
          TABLES
               LINES    = itab
          EXCEPTIONS
               ID       = 1.
    Now if i enter the Mat PO Text, the function works fine. But if i dont enter the Mat PO Text, the prog gives a dialog box error at compilation that ,
    <b>Text 450000001800010 ID F03 language EN not found</b>, where '450000001800010' is the value of 'txt'(passed to the function).
    how to check for invalid text name returning from the function ????
    Thanks for yur time.

    hi
    use the select query from STXH to c if the text exists and pass the same value as what u r doing to read_text and if the sy-subrc = 0...then only use the FM ...hope it helps..
    reward points if it help...
    regards
    Gunjan

  • Is there any function module to get the variables used in a query?

    Hi experts
    Please, do you know if is there any function module to get the variables used in a query?
    Thanks and regards
    Luis

    Hi Srini
    Yes, I have checked the tables but I need a function module
    Thanks anyway!
    Luis

  • When using Firefox I can no long get the two finger enlargement to work on my Apple. The same site will enlarge using Safari, so I assume it has to do with Firefox

    When using Firefox I can no long get the two finger enlargement to work on my Apple. The same site will enlarge using Safari, so I assume it has to do with Firefox

    Some gestures have been removed in Firefox 4 and later.
    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    browser.gesture.pinch.in -> <b>cmd_fullZoomReduce</b>
    browser.gesture.pinch.in.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.out -> <b>cmd_fullZoomEnlarge</b>
    browser.gesture.pinch.out.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.latched -> <b>false</b>
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold(user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

  • HT1414 ipod touch..when I plug in to laptop, itunes, I get this message.  "Itunes could not connect toehe Ipod because it is locked with a passcode.  You must enter your passcode on the ipod b/4 it can be used with Itunes"  It is stuck on the cord/itunes

    ipod touch..when I plug in to laptop, itunes comes up and I get this message.  "Itunes could not connect to thehe Ipod because it is locked with a passcode.  You must enter your passcode on the ipod b/4 it can be used with Itunes"  It is stuck on the cord/itunes screen and cannot go any further...HELP

    Place the iPod in Recovery mode and then connect to your computer and restore via iTunes.

  • Frequently I send an email to multiple contacts.....I'm constantly changing my selection of multiple contacts so using the "group" function doesn't get the job done.......so how can I go through m

    I guess I was not clear.....my fault....let me re-phrase:  frequently I send an email to multiple contacts.....I'm constantly changing my selection of multiple contacts so using the "group" function doesn't get the job done.......so how can I go through my list of contacts and quickly select those contacts that I want to receive that particular email....thx  

    You need an app that allows group messaging. Enter group messenger in the search bar in the app store.

  • I have an Apple 10.5.8 and just purchased a Canon MX726 printer to use with my computer but I get a message saying the software is not supported.  My computer skills are fairly modest; is an attempt to make this printer work with this computer doomed?

    I have an Apple using Mac OS X10.5.8 and just purchased a Canon MX726 printer to use with my computer but I get a message saying the software is not supported.  My computer skills are fairly modest; is an attempt to make this printer work with this computer doomed?

    10.8 if you must, but on the link above...
    Canon PIXMA MX726 drivers for OS X 10.6/10.7/10.8/10.9
    MX720 series Scanner Driver Ver. 19.1.0 OS X 10.6/10.7/10.8/10.9
    26.75 MB
    Download
    ICA Driver Ver. 3.1.0 (OS X 10.6/10.7/10.8/10.9)
    3.44 MB
    Download
    Quick Menu Ver. 2.2.0
    2.31 MB
    Download
    Canon IJ Network Tool Ver. 4.2.0 for Intel Mac (OS X 10.5/10.6/10.7/10.8/10.9)
    4.38 MB
    Download
    My Image Garden Ver. 2.0.1
    290.88 MB
    Download
    Easy-PhotoPrint EX Ver. 4.5.0 (OS X 10.7/10.8/10.9)
    102.19 MB
    Download
    MX720 series CUPS Printer Driver Ver. 10.84.1.0 (OS X 10.7/10.8/10.9)
    13.76 MB
    Download
    Speed Dial Utility Ver. 1.3.0 (OS X 10.6/10.7/10.8/10.9)

  • Failed to get the document information (LO 26315)

    Hi,
    I have to create an Xcelsius dashboard where I use a Live Office connection based on a WebI-report. The WebI is created on top of a BEx Query.
    I need to pass 12 parameters to the WebI-report in orde to get the correct data.
    Everything works fine in design-time, but when I want to preview the dashboard, I get the error: Failed to get the document information (LO 26315).
    After investigating the issue, I've noticed that everything works fine when the parameters I have to pass, are only created in the WebI-report. But in my case it is a BEx variable that causes the error.
    There is no possible way that I can recreate the BEx variable in the Universe (There are restricted key figures, calculated key figures and cell restrictions in the BEx query).
    My question: is there a way to pass a parameter from an Xcelsius dashboard to a WebI-report via a Live Office connection to a BEx variable?
    Lieven

    Fred,
    on the SAP Notes Search page on sdn.sap.com, you can enter the note number in a text field at the right side of the page, just above the Search Option part.
    Just enter Note 1357924 in that text field and press the blue icon with the arrows next to it. Thiw ill show the corresponding note.
    Lieven

  • Functional module to get the File from a given Directory

    Hi all,
    I am using a FM name 'subst_get_file_list' to get the file from a given directory but it is accepting only 40 Character length file only my requirement is to accept file name other than 40 char,
    give me good sugestion
    regards
    paul

    Hi Paul,
    Check the Function Module Gayathri has given. ie. 'SO_SPLIT_FILE_AND_PATH'.
    In the exporting parameter FULL_NAME , give the path name and in the importing parameter stripped_name , you will get the filename.
    Check this code.
    REPORT ZSHAIL_SPLITFILE.
    data: it_tab type filetable with header line,
          gd_subrc type i.
    tables: rlgrap.
    data: path type string,
          file_name type string.
    parameters file_nam type rlgrap-filename .
    data: user_act type i.
    at selection-screen on value-request for file_nam.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
      EXPORTING
        WINDOW_TITLE            = 'select a file'
       DEFAULT_EXTENSION       = '*.txt
        DEFAULT_FILENAME        = ''
        FILE_FILTER             = '*.txt'
        INITIAL_DIRECTORY       = ''
        MULTISELECTION          = abap_false
       WITH_ENCODING           =
      CHANGING
        file_table              = it_tab[]
        rc                      = gd_subrc
        USER_ACTION             = user_act
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if user_act = '0'.
    loop at it_tab.
    file_nam = it_tab-filename.
    endloop.
    endif.
    path = file_nam.
    CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
      EXPORTING
        full_name           = path
    IMPORTING
       STRIPPED_NAME       = file_name
      FILE_PATH           =
    EXCEPTIONS
      X_ERROR             = 1
      OTHERS              = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    at selection-screen.
    message i001(zmess) with file_name.
    Regards,
    SP.

  • Cannot access external data , Failed to get the document information.

    Hi All,
    In my dashboard there are live office connections which has optional prompts defined in SAP BI. I have bound the cells to these prompts in live office object properties.
    There are no errors while refreshing the LO connections from excel sheet.
    But when i run that dashboard and give BLANK value for that prompt then it throws the error :
    Cannot access external data , Failed to get the document information. (LO 26315).
    Reply highly appreciated.
    Thanks & Regards,
    DJ

    Hi Hardik,
    I am building a similar solution as yours connecting webi reports to Bex queries and reading the webi data through live office into the dashboards. I am using almost similar versions as yours - BW 7.1 SP5, BO 4.1 SP4, Dashboards and Live Office SP4 versions. I am facing issues setting up the live office connections itself. I create the Live office connections within an excel and when I try to import this excel spreadsheet into my dashboard designer, it runs forever and crashes.
    Could you please list out the steps you performed to get the Dashboard to preview live office data? Do you have OLAP connections for BW cubes and created WebI reports using these connections or You created a Universe on top of the Bex Queries?
    It would be great if you could share the steps performed.
    With respect to your issue, check if the report engine service is running. Do you have any error message details apart from this error?
    Thanks.
    Regards,
    Rohini.

  • Function Module to get the TIMESTAMP

    Hi,
    Is there any function module to get the TIMESTAMP as Outout , if i give input Time and Date.
    Or,
    If I go for the concatenate statement.. Do I need to concate the commas in to the target field?
    Because,
    I am not getting the proper result with this concatenate statement where I concatenated the YYYYMMDDHHMMSS in to the DECIMAL 15 Variable.
    Thanks,
    Naveen Inuganti.

    Hi use
    IB_CONVERT_INTO_TIMESTAMP' or IB_CONVERT_FROM_TIMESTAMP'
    Example:
    * Declaring the work variables.......................
    DATA :
      timestamp like TZONREF-TSTAMPS,
      time      like sy-uzeit,
      date      like sy-datum.
    * The following function module is used to convert the
    * time and date into GMT timestamp
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
      EXPORTING
        i_datlo           = sy-datum
        i_timlo           = sy-uzeit
        I_TZONE           = 'INDIA'
    IMPORTING
       E_TIMESTAMP       = timestamp.
    * The following function module is used to convert the
    * above obtained timestamp to PST time zone date and time.
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
      EXPORTING
        i_timestamp       = timestamp
        I_TZONE           = 'PST'
    IMPORTING
        E_DATLO           = date
        E_TIMLO           = time.
    write :/ 'Date and Time at PST zone is ',date, time.

  • Function module to get the sequence numbers based on PERNR & payroll period

    Hi,
        Right now i am using the function module 'CU_READ_RGDIR' to get the sequence number based on the PERNR. Once i get the data i am filtering based on payroll periods (begin date and end date). Is there any function module to get the sequence number directly based on PERNR and payroll period dates? if so could you let me know.
    Thanks
    Satya

    I think thats the only way
    CALL FUNCTION 'CU_READ_RGDIR'
        EXPORTING
          persnr          = p0001-pernr
        TABLES
          in_rgdir        = it_rgdir
        EXCEPTIONS
          no_record_found = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    check whether "Pay date for payroll result" with in Start Date and
                  End date, and "Reason for Off-Cycle Payroll" is initial
      LOOP AT it_rgdir WHERE paydt >= v_begda
                             AND paydt <= v_endda AND
                             void IS INITIAL
                             AND ocrsn IS INITIAL
                             AND srtza = 'A'.
        v_seqnr = it_rgdir-seqnr.
    ENDLOOP.
    Hope this helps.
    Thanks
    Kiran

  • Function module to get the dates from the year and the period

    Is there a function Module to get the dates from the year and the period

    Check with :
    To get last day of period use .
    LAST_DAY_IN_PERIOD_GET.
    To get last of month Use :
    RE_LAST_DAY_OF_MONTH
    HRVE_LAST_DAY_OF_MONTH
    LAST_DAY_OF_MONTHS
    ISB_PREVIOUS_PERIOD_DATE_GET
    Thanks
    Seshu

Maybe you are looking for

  • Transaction data loading error

    I have one info-cube: C1, characterstic: Time(0calday), material number(IO_MAT), company code (0comp_code) key figure: price of material (IO_PRC) I create one datasource for transaction data Material      Comp code     Price 110001     7770          

  • Imp: Generating reports in OIM 9.1.0.2

    Hi All, How can we generate reports in OIM 9.1.0.2 ? We need to generate reports for users between two dates to keep a track of what all resources were provisioned or deprovisioned and what all changes were made to user accounts etc. As per my unders

  • How do i discover if argStrings is empty

    ook...this is my first post here so hello to you all... i have recently started a computing degree so will be around lots over the next few eyars asking lots and hopefully later helping lots... anyway... i have a program that is calling the first val

  • OS X Install DVD could not be used as a startup disk

    When I click the Tiger install icon then click the restart button, I get the message, "Mac OS X Install DVD" could not be used as a startup disk. Please make sure the Mac OS X installation disk is in the drive." Saw this post also from 6th Nov, but n

  • Dynamic rendering of button using ADF Toplink

    In the property inspector the options available are default,true,false if i want to bind then is there any other option to do it.