period overlaps the code does not work in apex page

Hello

Employees have a schedule with a start date and end. Calendar periods cannot overlap for the same employee.

I have a function that returns the error of validation of text as follows:

declare
number of l_dummy;

Start
Select count (*)
in l_dummy

of fus_medewerker_roosters
where mdr_code =: p61_mdr_code
and <>id: p61_id
and to_date(:p61_begin_periode,'DD-MON-YY') < = eind_periode
and to_date(:p61_eind_periode,'DD-MOn-YY') > = begin_periode
+;+

If l_dummy > 0
then
Back to 'this employee already has a calendar in this period.';
on the other
Returns a null value.
end if;

end;

But the code does not work. It records data of an employee even though the periods overlap.

But the code works correctly in workshop:

declare
number of l_dummy;

Start
Select count (*)
in l_dummy

of fus_medewerker_roosters
where mdr_code =: p61_mdr_code
and <>id: p61_id
and to_date(:p61_begin_periode,'DD-MON-YY') < = eind_periode
and to_date(:p61_eind_periode,'DD-MOn-YY') > = begin_periode
+;+

If l_dummy > 0
then
DBMS_OUTPUT. Put_line ("this employee already has a calendar at this time."); end if;

end;

What goes wrong. Why it works very well in the Studio, but not in my page?

Kind regards
Diana

Edited by: dianap on Sep 4, 2009 08:31

Hi Diana,

It comes with the following:

to_date(begin_periode,'DD-MON-YYYY')

and

to_date(eind_periode,'DD-MON-YYYY')

Here are the dates of the table itself, should not be converted to dates.

Secondly and more important still, the list of selection of P11_MDR_ID does not return NULL, it returns "null %" - it is a string that should be converted to null.

I have made a few changes for postings of these - please take a look and check that everything is working ok.

Andy

Tags: Database

Similar Questions

  • hitTest on an object array - use removeEvent and now the code does not work

    I used hitTest to see what sunny (mc) would hit one of five objects in a table.

    BUT I had to use removeEventListener otherwise she'd keep ancestral. But now I can't "beat" the next object. Why the addeventListener method does not work yet?

    stage.addEventListener (MouseEvent.CLICK, myClickReaction);
    speeds the LONG NYPOTENUSE
    var v: Number = 5;
    var varObject:String;
    var i: Number;
    var arrayObjects:Array;

    complete table and initialize the variables i and varObject
    arrayObjects is ['chocolate', 'ice', 'pizza', 'Burger', 'sandwich', 'egg'];.
    i = 1;
    varObject = arrayObjects [i-1];
    trace (varObject);


    mouse click point
    var clickPoint:Point = new focus();
    function myClickReaction(e:MouseEvent):void {}
    clickPoint.x = mouseX;
    clickPoint.y = mouseY;
    addEventListener (Event.ENTER_FRAME, onEnterFrame);
    }
    function onEnterFrame(event:Event):void {}
    var xDistance:Number = clickPoint.x - sunny.x;
    var yDistance:Number = clickPoint.y - sunny.y;
    var angle: Number = Math.atan2 (yDistance, xDistance);
    Sunny.x += v * Math.cos (angle);
    Sunny.y += v * Math.sin (angle);
    If (clickPoint.x > = sunny.x) {}
    sunny.gotoAndPlay ("walk straight");
    trace (Math.ABS (xDistance));
    }
    If (sunny.x > = clickPoint.x) {}
    sunny.gotoAndPlay ("left foot").
    trace (Math.ABS (xDistance));
    }
    If (Math.abs (xDistance) < = 10) {}
    trace ("Works");
    sunny.gotoAndPlay ("static");
    removeEventListener (Event.ENTER_FRAME, onEnterFrame);
    }
    }
    addEventListener (Event.ENTER_FRAME, enterFrameHandler);
    function enterFrameHandler(e:Event):void {}
    If (sunny.hitTestObject (hotspot_pizza)) {}
    If (sunny.hitTestObject (varObject)) {}
    If (sunny.hitTestObject (this [varObject])) {}
    i = i + 1; / / ie: he comes to the table object and NOT the string.
    trace (varObject);
    removeEventListener (Event.ENTER_FRAME, enterFrameHandler);
    }
    }

    because you stop your loop when the first object has a positive hittest.

    What do you do?

  • The University provided renewing his subscription student creative cloud, but the code does not work.

    I have been updated Creative Cloud, then update to Photoshop. When I open it it says that I started my 30 day free trial. I then went to my University for a new code site renew my account. The code provided for me did not work, I even updated my email on my account to my email to student, as site Web of the University said that it may be useful. I am still unable to renew my account. Thanks in advance!

    Hello

    Please see the following links:

    Serial numbers, purchase and product codes codes | Schoolgirl and her teacher editions

    Redemption code help

    If you still need help, mention code in a personal message, I will check and let you know if the redemption code is valid or not.

    Let us know if that helps.

    Kind regards

    Bani

  • jQuery code does not work in phonegap

    Someone gave me a code https://jsfiddle.net/adeneo/2uod274d/ jsfiddle

    It works well in jsfiddle, but when I put the code in my Xcode and amended to incorporate my code and run it in the Simulator, the code does not work at all (i.e., no data is stored in the local storage)

    I am building an app for iOS with phonegap. JS:

    <script type="text/javascript" src="cordova.js"></script>
      
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
      
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>

      
    <script type="text/javascript">
      document.addEventListener("deviceready",onDeviceReady,false);

      function onDeviceReady() {

      document.getElementById("btnSave").addEventListener("click",saveData,false);
      document.getElementById("btnShow").addEventListener("click",showData,false);
    }

      function saveData(){
      var data = window.localStorage.getItem("date");

      var dates = data ? JSON.parse(data) : [];

      dates.push( new Date() );

      window.localStorage.setItem("date", JSON.stringify(dates));

      alert("Your data is stored");
      }

      function showData() {
      var data = JSON.parse(window.localStorage.getItem("date"));
      console.log(data);
      $('#res').html(JSON.stringify(data));
      $(this).html('Update result');
      }

    < /script >

    HTML:

    <button id="btnSave"> Save Data </button>

      
    <button id="btnShow"> Show Data </button>

    I don't know what is happening because the code works well in jsfiddle, but for some reason any just does not work in my phonegap.

    My version of phonegap 5.3.6 cordova version 5.3.3

    Post edited by: Fang Kerry, I added my complete code is easier to see the problem (if any)

    jQuery has nothing to do with this, as far as I can tell (so not sure why it is in your title). The problem is that the result of JSON.parse (data) is not an array, what you think it is, it's a chain. The chain respond well to 'push '. I get that when you use this code in jsfiddle he is somehow coming out as a table, but I think it must be because of something done jsfiddle. When I do the same commands in the console of my browser, I get a string, not a table, so your problem.

    Instead:

    function deserializeDates() {
        var data = window.localStorage.getItem("date");
        var dates = []; // worst case, we'll return an empty array.
        if (data) {
            try {
                dates = JSON.parse(data);
                 // handle the case that dates is a single item and not an array
                if (!(dates instanceof Array)) {
                    dates = [dates];
                }
            } catch (err) {
                 // the stored dates failed to parse for some reason; you might want to do something about it
                 console.log("Failed to parse " + data);
             }
        }
        return dates;
    }
    
    function serializeDates(dates) {
        window.localStorage.setItem("date", JSON.stringify(dates));
    }
    
    function saveData(){
         var dates = deserializeDates();
        dates.push( new Date() );
         serializeDates(dates);
        alert("Your data is stored");
    }
    
    function showData() {
         var dates = deserializeDates();
        console.log(dates);
        ...
      }
    
  • DW CS4 'go to the code' does not go to the css code

    When you are in the css Panel and right-click on a particular style, by clicking 'Go to the code' used to put me to the exact location of this rule in the relevant css file. This is no longer. It seems to bring me to the relevant html in the html source code, but code that is useless. Someone at - it ideas? I use this feature TONS and can't live without it.

    Thank you

    Anne

    I just tested CS4 preferences changed to 'Edit using CSS dialog box'. Go to the Code still works without problem.

    Now, I noticed that at the top, there is a new "toolbar" with all of the files that are associated with this document and css files are among them. I did not like it, cause I want the CSS OPEN file when I edit it, so I know not to save and download the right to file in just 2 clicks. I noticed that the css files no longer appear in the "toolbar" - I could have attempted to change these settings.

    The related files toolbar is controlled by the General category of the preferences panel. The fourth element of the top is 'enable related files '. Even with this unchecked, go to the Code works.

    The only other edit I've done recently is to change toolbar real to exclude some buttons I don't a need (cut/paste/copy/etc...) so that the buttons I have they use all appear on a single line. I edited the xml file and saved and it seems to work fine - if it wasn't for this 'go to the code"no longer works.

    Could any of my changes "broken" this feature? How to cancel the best?

    It is possible that your changes might have broken some features in Dreamweaver. How to cancel them is to remove your personal Configuration file and let Dreamweaver generates a new with factory settings.

    Now, it seems to only occur when the css files are called from in an inclusion... but it worked before.

    Yes, it's a difference between Dreamweaver CS3 and CS4. Go to the Code does not work in CS4 if your style sheet is attached using an inclusion. It must be directly related to the page or be linked through the @import command by a style sheet linked directly to the page. If you feel this is a limitation of your workflow, Please submit a request for improvements to Adobe to support style sheets linked by include files.

    In addition, on new tests, when I change the styles, I get an error. See the attached file. I bet that they are related. I can't find anything about it. ESP since AID disappeared.

    I don't know anything about the error message. However, I can help you is certainly not gone. When you access using Dreamweaver CS4, the help files are launched in a browser, which should connect directly to the online help system. Help has moved online because it can be updated more frequently if problems are discovered. It also has a comment system, where I provide many of the answers or refer to Adobe if necessary. Even if you are offline, access to help is expected to launch a local version of the original files.

  • Spellercheck Firefox does not work on full page

    The spellercheck does not work to full page. When a page is very big check the spelling checker works somewhat.

    As in this Wikipedia page. https://en.Wikipedia.org/w/index.php?title=Wikipedia & action = Edit

    How can I fix?

    There is a maximum number of errors that are reported.

    • Extensions. SpellCheck.Inline.Max - spelling mistakes = 500

    You can be hitting this limit on a large page with a lot of mistakes.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

  • Reinstall Windows 7 and now the activation code does not work

    I upgraded my PC with an AM2 chip to an i5.  I had to reinstall windows and now my activation code does not work.   It's like 2-3 years, I forgot when I built the computer.  It installed on my other windows 7 install and created the windows.old folder.  How can I get reactivated?  I used the same code since I built my computer.

    Thank you

    Have you tried to restart by phone?

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

  • The JavaScript code does not work

    Thank you for this beautiful prduct comfortable, but when I try it in any site uses javascript code does not work.

    Open this link: http://view.jquerymobile.com/1.3.1/demos/widgets/panels/ and try clicking the buttons (nothing will happen).

    Yes. To be clear, you must click on the device to see work.

  • The keypad does not work on my computer hp laptop g72,

    The keypad does not work on my laptop hp g72, NumLock, slash, star, dashboard and more keys only work all digital and 'point' or 'period' keys don't work. Help, please.

    Hello

    You need to contact HP support, check their online documentation and drivers, diagnostics and ask for their
    Forums about known problems.

    Support HP & drivers
    http://welcome.HP.com/country/us/en/support.html

    Contact HP
    http://welcome.HP.com/country/us/en/contact_us.html

    HP forums
    http://h30434.www3.HP.com/PSG/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Get the error the Service does not work when you try to update

    Original title: Dell Inspiron 1545 model

    My Labtop wife; the automatic update is enabled; but will NOT be updated. When I try to update; There are NO error codes. After trying to update. The computer

    addresses by specifying THE SERVICE IS DO NOT running. You must restart; also the F8 key does not work.

    Hello

    1. What is the error message right on the service does not work?

    2. were there any changes (hardware or software) to the computer before the show?

    Perform the steps in the link and check.

    The problems with the installation of updates (Windows Vista)

    Hope this information helps.

  • A refurb Lenovo/IBM PC windows 7.0 SW, software code does not work for charging SW after a system restore

    A refurb Lenovo/IBM PC windows 7.0 SW, software code does not work for charging SW after a system restore. How can I get a new one

    Skip, enter the product key, and then complete the installation.

    Try the phone activation:

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

  • Recreated Vista upgraded to 7 and the key does not work

    I upgraded my Vista Ultimate to Windows 7 Ultimate via a retail upgrade copy (2010).  I'm a redefinition now machine (should have done years ago), and the upgrade code does not work.  The product key that is listed in the properties of my system no longer.  I entered the code of Vista, but who is not recognized. I have the original paperwork, but nothing matches a key for Windows 7.  Where am I wasting?  Thank you-

    How to activate Windows 7 or Vista manually (activate by phone)
    http://support.Microsoft.com/kb/950929/en-us

    1) click Start and in the search for box type: slui.exe 4
    (2) press the ENTER"" key.
    (3) select your "country" in the list.
    (4) choose the option "activate phone".
    (5) stay on the phone * do not select/press any option * and wait for a person to help you.
    (6) clearly explain your problem to the support person.
    (7) the person must give you a confirmation ID, copy it down on paper,
    (8) check that the ID is correct in reading the support person.
    (9) to enter the ID number, then click 'Next' to complete the activation process.

    ----------------------------  Alternatives -------------------------------------

    To enable the use of the phone
    1. open Activation of Windows by clicking on the Start button, right click on computer, clicking Properties.
    then by clicking on activate Windows now. ?

    2. click on show me other ways to activate.

    3 type your Windows 7 product key, and then click Next.

    4. click on use the automated telephone and then click Next.
    If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    5. click on the location nearest you from the drop-down list, and then click Next.

    6. call one of the available phone numbers listed. An automated system will guide you through the activation process.

    7. When prompted, enter the installation ID that is listed on your screen in your phone keypad.

    8 Note the confirmation ID the phone system gives you.

    9. under the terms of step 3, type the confirmation ID in the space provided, click Next, and then follow the instructions.

    10. If the activation is not successful, stay on the line to be transferred to a product activation agent who can help you.

    Microsoft Activation centers worldwide telephone numbers:
    http://www.Microsoft.com/licensing/existing-customers/activation-centers.aspx
    (This site is for activating Volume License, but if you call, they will help you)

    The phone number is not working:
    Microsoft Wordwide contacts: http://www.microsoft.com/worldwide/default.aspx

    Register Windows 7
    http://Windows.Microsoft.com/en-us/Windows7/help/register
    Register Windows 7 and you automatically receive a series of three welcome to Windows e-mails
    filled with tips, creative tips and other information to you help get the most out of Windows 7.
    You also get a subscription to the monthly newsletter of Windows Explorer,
    where you will find other tips and tricks, as well as special offers.

    Activation and registration of a Microsoft product
    http://support.Microsoft.com/?kbid=326851
    Windows activation: (888) 571-2048

    Learn about Activation:
    http://TechNet.Microsoft.com/en-us/library/ff793423.aspx

    J W Stuart: http://www.pagestart.com

  • I have Adobe Creative Suite 5 Master Collection. Activation code does not work?

    I have Adobe Creative Suite 5 Master Collection. Activation code does not work when I install it on my Macbook. It installed properly on my Windows PC, however.

    I thought the serial numbers for specific version CS5... Mac - GOLD - Windows, not both

    You sure have a serial number which is good for both?

  • Lightroom6 installation code does not work

    I'm tired, the installation code does not work.

    After 10 days, there is no way to be supported by Adobe, but they took my money.

    I'll block the payment and never again buy Lightroom.

    Mac or Windows and EXACTLY what version of the operating system?

    Recent Mac AND Windows operating systems have been known to cause problems "weird."

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

    -or by phone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • Why my license code does not work on lightroom 6 for mac?

    Why my license code does not work on lightroom 6 for mac? My os x is "el capitan".

    Please try the steps to serialize Lightroom CC trial to activate like Lightroom 6 mentioned on: https://helpx.adobe.com/lightroom/kb/serialize-lightroom-cc-trial-to-activate-as-lightroom - 6.html

    You can also try: error "serial number is not valid for this product". Creative Suite

Maybe you are looking for

  • Why open the cover on my iPad Air is more directly shows the PIN code screen

    Hello After installing iOS 10, when I opened my iPad original air cover (with magnet) I suddenly need to do something extra to access the unlock PIN code screen. I used to be able to enter my PIN to unlock immediately. It's really annoying, that I al

  • new terminal terminal to access command prompts

    Simple question: I'm running Apache caldav on Maverick for manage my calendars small office. When I start the server, the console remains with the caldav server process (username and $ is no longer happens). What is the command key to exit the server

  • Where can I see my version of Firefox?

    In earlier versions, there was a link where I could click "On Firefox" and see the installed version of the help.Now, there is no help, not on Firefox.Where can I see the version I have? It's a very simple question! Someone should be able to describe

  • Mac pro (2014) battery is not charging

    I met a problem for battery does not charge when one day when I opened the Mac Pro 13 "(mid of 2014)."  So I called Apple support for like reset the SMC, another MagSafe adapter, it seems still couldn't work.  I checked the battery information that s

  • TE2300 - fatal system error

    Hi all I am a newbie here, I get the blue screen on my computer (TE2300) error: Stop: c000021a {fatal system error}The process of Windows Subystems ended unexpectedly with status c0000005 (0x7c9106c3 0x0069f36c) Beginning physical memory dumpTotal ph