Another problem posed by the

WHERE rpt_dt BETWEEN TO_DATE('14-Oct-2008', 'dd-Mon-yyyy') and TO_DATE('28-Oct-2008', 'dd-Mon-yyyy')
The above statement is missing a day as its display of October 14, 2008 results-October 27, 2008

How can I solve this problem?

Thank you

Dates also have a time component, if you select actually all records where rpt_dt is between 14 October 2008 00:00:00 and 28 October 2008 00:00:00

To include all dates and not excluding a possible use of an index, use this technique:

WHERE rpt_dt BETWEEN date '2008-10-14' and date '2008-10-28' - interval '1' second

Kind regards
Rob.

Tags: Database

Similar Questions

  • Converts a string to a problem posed by the

    Hello!

    I get an ORA-01861: "literal does not format string" when you try to convert a string
    on a date.

    Currently stored as VARCHAR2
    14SEP11
    Should be
    to_date(start_op, 'DD-Mon-YY HH24:MI:SS') AS FORMATTED
    Date format
    NLS_DATE_FORMAT                DD.MM.RR 

    user545194 wrote:
    Hello!

    I select the column name:

    select to_date(start_op, 'DD-MON-YY') AS FORMATTED from table
    

    Column name: start_op

    A conversion problem?

    SQL> create table otn(p_date varchar2(7));
    
    Table created.
    
    SQL> insert into otn values('14SEP11');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select to_date(p_date,'DDMONYY') from otn;
    
    TO_DATE(P
    ---------
    14-SEP-11
    
    SQL> 
    
    SQL> alter session set nls_date_format='ddmonyy';
    
    Session altered.
    
    SQL> select to_date(p_date,'DDMONYY') from otn;
    
    TO_DATE
    -------
    14sep11
    
    SQL> 
    
  • String to the problem posed by the...

    I'm a string (from Date of toSting method) and this shot is not supported by the httpparser how can I convert to sting? and the string I get Date toSting method could be in different formats depending on whether the zone is available or not... How can I handel it.. ?

    Kind regards

    Kedar

    I use this date format because it is the default format you will get when you do date.toSting... and this was my requirement... that I get the date from the server in the from of a chain... I used the the substing and got a solution yet... but I would really appreciate if you could provide the solution so that I could make improvements in mine if necessary...

    Thanking you,

    Kaddy

  • Select the problem posed by the query?

    Hello

    I use 10g and here is my example query adds nothing. I know there are records in the database. It must be linked with my date conversions.

    SELECT a.gm_cd, a.draw_cd, NVL (b.cpns, 0) cpns, NVL (b.clms, 0) SSAC, NVL (b.amn, 0) amn FROM (SELECT gm_cd, draw_cd, TO_DATE (draw_tm, ' DD/MM/YYYY') draw_tm TO draw WHERE gm_cd = 10105 AND TO_DATE (draw_tm, ' DD/MM/YYYY') = TO_DATE (sysdate-1, ' DD/MM/YYYY')) a, (SELECT SUM (DECODE (a.from_draw, a.to_draw, a.cpns * b.sing_ind 0)) cpns) (, SNSOT SUM (a.clms* b.sing_ind), amn SUM (a.amn* b.sing_ind) OF draw_sales a, ACC_TYPE b WHERE a.tp = b.cd AND a.DT = TO_DATE(sysdate-1, 'DD/MM/YYYY') AND a.gm_cd = 10105) b ORDER BY a.gm_cd, a.draw_cd

    Any ideas?

    Furthermore, draw_tm is a column DATE (05/11/2013 03:59:59) and the DT is also a column DATE (10/05/2013)

    raysefo wrote:
    Hello

    I use 10g and here is my example query adds nothing. I know there are records in the database. It must be linked with my date conversions.

    SELECT a.gm_cd, a.draw_cd, NVL (b.cpns, 0) cpns, NVL (b.clms, 0) SSAC, NVL (b.amn, 0) amn FROM (SELECT gm_cd, draw_cd, TO_DATE (draw_tm, ' DD/MM/YYYY') draw_tm TO draw WHERE gm_cd = 10105 AND TO_DATE (draw_tm, ' DD/MM/YYYY') = TO_DATE (sysdate-1, ' DD/MM/YYYY')) a, (SELECT SUM (DECODE (a.from_draw, a.to_draw, a.cpns * b.sing_ind 0)) cpns) (, SNSOT SUM (a.clms* b.sing_ind), amn SUM (a.amn* b.sing_ind) OF draw_sales a, ACC_TYPE b WHERE a.tp = b.cd AND a.DT = TO_DATE(sysdate-1, 'DD/MM/YYYY') AND a.gm_cd = 10105) b ORDER BY a.gm_cd, a.draw_cd

    Any ideas?

    Furthermore, draw_tm is a column DATE (05/11/2013 03:59:59) and the DT is also a column DATE (10/05/2013)

    If draw_tm is a DATE data type, then you shouldn't do a TO_DATE on it, as you don't need to convert it to a date. If you try to remove any component "hour" of him, then you must use TRUNC (draw_tm).

    Similarly, with sysdate, you must use TRUNC to truncate. Never use TO_DATE datatypes in other data you causes an implicit conversion in varchar2 who depend on your NLS settings and may fail.

  • case statement and the problem posed by the...

    Hello..

    Here is the code I use in my pl/sql anonymous block:
    DECLARE
    
     X555 NUMBER;
    
     P1_X2 varchar2(10) := to_char(sysdate, 'dd.mm.yyyy');
     
    BEGIN
    
    case 
    
    when 
    P1_X2 = to_char('sunday') 
    then
    SELECT COUNT(*) into X555 FROM biwh.ORGANIZ Tbl 
     WHERE SAM_FORMA IN ('16') and IDEN_N_TAR in to_date(/*:*/P1_X2, 'dd.mm.yyyy')-3;
    
    else
    
    SELECT COUNT(*) into X555 FROM biwh.ORGANIZ Tbl 
     WHERE SAM_FORMA IN ('16') and IDEN_N_TAR in to_date(/*:*/P1_X2, 'dd.mm.yyyy')-1;
    end case;
    
    dbms_output.put_line(X555);
    
    end; 
    I want to do something like this:
    If it's Sunday, leave this part of the labour code:
    SELECT COUNT(*) into X555 FROM biwh.ORGANIZ Tbl 
     WHERE SAM_FORMA IN ('16') and IDEN_N_TAR in to_date(/*:*/P1_X2, 'dd.mm.yyyy') -3; 
    can you tell me the correct syntax of the code? where did I did mystake?

    SRY for my English...
     P1_X2 varchar2(10) := to_char(sysdate, 'dd.mm.yyyy');
    
    BEGIN
    
    case 
    
    when
    P1_X2 = to_char('sunday') 
    

    In the light of the foregoing, you set P1_X2 to a string value that resembles '05.10.2009' and then try to compare it to a string that looks like "Sunday".

    I'd be tempted to define P1_X2 as a DATE, then check against that for example

      p1_x2 DATE := trunc(SYSDATE);
    
    BEGIN
    
     CASE TO_CHAR(p1_x2,'fmday')
        WHEN 'sunday' THEN
          SELECT COUNT(*)
          INTO   x555
          FROM   biwh.organiz tbl
          WHERE  sam_forma IN ('16')
          AND    iden_n_tar = p1_x2 - 3;
    
        ELSE
    
          SELECT COUNT(*)
          INTO   x555
          FROM   biwh.organiz tbl
          WHERE  sam_forma IN ('16')
          AND    iden_n_tar = p1_x2 - 1;
      END CASE;
    

    The above assumes that you store iden_n_tar as a 'date at midnight '.

    You could go further and have a single query that moves from the "cause" of the where clause:

          SELECT COUNT(*)
          INTO   x555
          FROM   biwh.organiz tbl
          WHERE  sam_forma IN ('16')
          AND    iden_n_tar = p1_x2 - CASE TO_CHAR(p1_x2,'fmday')
                                                      WHEN 'sunday' THEN 1
                                                      ELSE 3
                                                   END;
    
  • How to make El Capitan to recognize my Canon printer I've done what I think is everything: one clean install of El Capitan (another problem); Reinstall the software from the CD; Anon same impression reset. No luck at all.

    How do El Capitan to recognize my Canon printer? I did what I think, that's all I can: clean install of El Capitan (another problem); Reinstall the software of Canon from the CD; same impression reset - my printer shows not yet up! I tried LAN and USB.  No luck at all. The printer does not yet appear upward on the tree of USB in the reporting system.

    What printer model Canon...?

    kologano wrote:

    The printer does not yet appear upward on the tree of USB in the reporting system.

    This looks more like a bad USB cable or bad printer.

  • My Webcam has problems detected by Skype and repeat myself there is another program that uses the webcam. Skype device code 43 usb video.

    My Webcam has problems detected by Skype and repeat myself there is another program that uses the webcam.

    Also got the guests when using Skype as a video device usb was not detected and that it is a code 43.

    Have tried several way sto resolve this problem. CyberLink YouCam HP's running came preloaded on the laptop. The webcam is running when this program is being used separately.

    Inappropriate Feedback Forum of Windows hardware and drivers Forum.

    My Webcam has problems detected by Skype and repeat myself there is another program that uses the webcam.

    Also got the guests when using Skype as a video device usb was not detected and that it is a code 43.

    Have tried several way sto resolve this problem. CyberLink YouCam HP's running came preloaded on the laptop. The webcam is running when this program is being used separately.

    Inappropriate Feedback Forum of Windows hardware and drivers Forum.

    Hello, Aadi467,

    A device driver has notified the operating system that the device failed.

    Run the diagnostic tool of hardware devices do not work or are not detected in Windows on the Microsoft Fix it Center.

    You can also uninstall the software from Cyberlink.  There is a found here download link to reinstall the software after restarting the computer.

    http://h30434.www3.HP.com/T5/notebook-operating-systems-and/lost-my-CyberLink-and-UCAM/TD-p/760367

  • Problem with rename folders in Windows 7: get this error message: "the action cannot be completed because the folder or file is open in another program. Close the folder and try again. »

    When I try to rename a folder in Windows 7 I get this error message: "the action cannot be completed because the folder or file is open in another program. Close the folder and try again. "Can anyone help?

    I gave up and solved the problem by buying a third party software to use as a directory, Directory Opus.  It is much more functional than the Microsoft Directory and I have never problem renaming of files.  I am just amazed that so many people have this problem and Microsoft has not fixed.

  • External hard drive does not work. Is there another way I could solve the problem without formatting the external hard drive?

    My external hard drive works. I tried to plug and when I tried to open it, it says to format the drive until I could use it. Everything works well as when I plugged the USB icon shown on the screen. When I check the disk management, it showed that the partition of the drive is there.

    I tried to change the drive letters, but still having the same problem. I also tried to run the disk check on the command prompt and the properties of the drive, but it still can not because there is error popping up saying that the disk check cannot be performed because Windows cannot access the disk.

    Is there another way I could solve the problem without formatting the external hard drive?

    I tried the first step in troubleshooting the hard drive, but it gives a
    error in saying that "hardware changes might not have been detected.

    So I tried the second method, and when I click on the "Check now" button his
    gives an error saying that "the disk check cannot be performed because .
    Windows can not access the disk".".

    So is there any other way or option?

    Thank you

    Jason

  • I use LR on my PC, Windows 8.0.  Recently encountered a problem where I can't access one of my LR catalogs.  The LR error message tells me that another application is using the file.  I have to close the "another version" of LR, then restart.

    I use LR 6 on my PC, Windows 8.0.  Recently encountered a problem where I can't access onof my LR catalogs.  The LR error message says that the book is opened in another application.  Close the "another version" of LR, then again to open the catalog.  I find it a different version of LR running on my PC.  ????

    In the same folder that your catalog file is a file whose name ends with .lock

    Delete this .lock file

    DO NOT REMOVE ANYTHING ELSE

  • I tried a lot of time to download Lightroom on my MacBookPro without success. I already remove the firewall. Perhaps because of a slow connection to the Lebanon? Or another problem?

    I tried a lot of time to download Lightroom on my MacBookPro without success. I already remove the firewall. Perhaps because of a slow connection to the Lebanon? Or another problem?

    Beatricel88978029 you receive specific when errors download Photoshop Lightroom?  For more information on how to resolve errors download please see error download and installation of the creative cloud application.

  • Hi, I have another problem, when people visit my site that they could not return to the home page

    Hi, I have another problem, when people visit my site that they could not return to the home page

    Hello

    Problem is in outline view.

    Please follow the steps below and you should be all set.

    1. go in the Plan view.

    2. right click on the 'HOME' page

    3. Select "Menu" > "include the Page containing the hyperlink.

    4 save the file and then try to preview.

    You should be all set.

    Concerning

    Vivek

  • manage the z-index property in the chrome browser (was: is there another problem with Chrome?)

    Hello

    I wonder is there another problem with Edge and Chrome.

    I know that something got sorted out but now I have a problem with rectangles (such as the hitboxes) not appearing is not in Chrome.

    Anyone know why this is happening?

    Hi Robyn,

    Looks like a problem with chrome. He is not able to manage the z-index property (although set) in this case. Due to which the user is not able to click on the button that is hidden by another element.

    There is a workaround solution you can do on board animate:

    You simply select the item named "s_cpl_fa_nav_x2" in the Panel edge ' Elements' animate and drag just below the element named "s_cpl_fa_0_guide_page1" and delete the selected item. This will place the first below the latter, with regard to the stacking order of the UI, and so the click event will work.

    I hope this works.

  • I have an ERROR CODE 36 during the backup of my library of PHOTOS from one external drive to another. What is the best way to solve this problem? Also, what is someone used 'dot_clean '?

    I have a MacBook Pro that is primarily used for PHOTOS and use 2 external drives 1 for holding my PHOTO library and one for the back up. I have about 1 TB of data of photos. My back ups have worked perfectly since the establishment more than 12 months ago. However, I just got a CODE of ERROR - 36 problem which prevents the backup after that about 700 GB of data has been processed. I need to find a solution and I was wondering if anyone can advise me on that. I saw something called "dot_clean" on the web and I was wondering if it is safe to consider option.

    If the Photos or iPhoto is running, exit it and try the backup again.

  • Problems with after the start on TB2-X30L event (another name LENOVO TAB 2 10-30)

    Hello

    We are developing an application for Android. And we must be asure that the application starts again after the reboot of the tablet. But Lenovo TB2-X30L is not drawn from this event, so that the application does not start.

    The Tablet is running Android, which is default 5.1.1.

    We are currently looking for a custom rom, but we can only find to TB2-X70L. Anyone has a solution to this problem, or could Lenovo send a fix for this problem? Maybe the ability to downgrade Android for 4.4 KitKat?

    Best regards

    Alex Sleiborg

    Solved. It is an application of system, that solved the problem. But it is not a nice solution however

Maybe you are looking for

  • How to use thunderbolt with Macbook Air (13 inch, late 2010)

    Hi guys,. I have a Macbook Air (13 inch, late 2010), which means he has only Mini DisplayPort and NO bolt of lightning. And I need to connect it to the hard drive (my book lightning Duo) with crush. Is it possible to do? If so, what type of adapter,

  • How to choose the line PFI to use on the port of the 5761?

    I understand that the VIDEO that I use on my DAC 5761 allows me to access 8 PFI lines.  However, when I access my 5761 devices in the project window by clicking the "+" next to the name of the module, I see that 'PFI Input' and ' output PFI.  I tried

  • 630 HP: Question for laptop

    What Hp 630 Supprot Windows 8 or 8.1?

  • Why the standard user can't print on network?

    -Computers A and B are networked through a router Linksys Wireless. -An HP printer, set apart, is attached to A computer, via USB -Both computers are under XP SP3 -All users on both computers can access the Internet. -All users on A computer can prin

  • Reg query using

    Hello I'm trying to use Reg Query to review the contents of a registry key. More precisely HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify I just want to know what are the subkeys. I expect to be IconStreams