How to check for the date validation

Hello

I have 3 validation of date in order.

10 - P1_FROM - (type - Item specified is a valid date)
20 - P1_TO - (type - Item specified is a valid date)

30 compare dates P1_FROM & P1_TO
I want to run it only when these 2 dates are field not null not and registered as valid a date.
HOW to set that State...
Type - Function returning bollean

Validation Expression1 - 
if TO_DATE(:P1_TO,'MM/DD/YYYY') <= TO_DATE(:P1FROM,'MM/DD/YYYY') then
     return false;
else
     return true;
end if;

Condition- PL\SQL Expression // I want to put a condition here NOT NULL as well as VALID date
:P1_FROM is not null AND
:P1_TO is not null
Thank you
Deepak

Try an exception handler. for example

begin
if :P1_TO is not null and :P1FROM is not null then
  if TO_DATE(:P1_TO,'MM/DD/YYYY') <= TO_DATE(:P1FROM,'MM/DD/YYYY') then
    RETURN 'From date cannot be after the To date';
  end if;
else
  if :P1_TO is null and :P1FROM is  null then
    null;
  else
    RETURN 'Both To and From values must be specified';
  end if;
end if;
EXCEPTION WHEN OTHERS THEN
  RETURN 'Invalid Date';
end;

Tags: Database

Similar Questions

  • What ever the data that we are loading in HFM, how to check if the data are correct or not?

    Hello!

    This is SANDEEP, I loaded data using FDM in HFM. How to check if the data is correct or not, what ever the data I was responsible in HFM.

    Please tell me how to recover the data and what format, clearly can you me the data verification process step by step.

    It would be useful for me...

    Thanks in advance...

    Kind regards

    SANDEEP

    Hi Sandeep,

    I think the best way is to extract data from HFM for the same POV that you have loaded FDM and check if it is the same.

    If you then use HFM 11.1.2.x version

    1. login to the application and go to the menu Administration / extract / data.

    2. set the POV that you have loaded the data, then unzip it. You can open the file unzipped in a notebook

    3. you can compare the file with the data file generated by FDMEE under Outbox folder.

    But what would you give all the data corresponding to the POV that you set. So please ensure that you have the correct POV, defined according to the export FDMEE.

    Thank you

    Chandra

  • How to check for the two first digits?

    Can someone please... There is demand to have a hidden field on the form that will be filled with data. It's going to be 6 digits long and could start with 02 or 04. I need to check on the DocReady event, for the first two digits. If the first two digits are 02, the presentation of the form will remain as it is. If the first two numbers are 04, I'll have to show two hidden subforms. Can someone please provide an explanation on how to check for the first two digits of field 6 digits and do some actions.

    Thank you very much

    No, only in the event: Exchange.

  • How to check for the application ID in a function of connection?

    Hello

    I have a connection procedure which is something like this:
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :P58_USERNAME,
        P_PASSWORD    => :P58_PASSWORD,
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':15'
        );
    And the authentication procedure is this:
    create or replace
    FUNCTION  "ACL_CUSTOM_AUTH" (
        p_username IN VARCHAR2,
        p_password IN VARCHAR2
        )
    RETURN BOOLEAN IS
    BEGIN
      FOR c1 IN (SELECT 1 
                  FROM acl_employees
                 WHERE upper(userid) = upper(p_username)
                   AND mot_de_passe = p_password)
      LOOP
        RETURN TRUE;
      END LOOP;
      RETURN FALSE;
    END;
    I want to check for an application in the acl_employees table ID, because I want to check if this user is credited for THIS specific APP_ID, adding a following kind of code to the function of authentication:
    AND application_id = :app_id)
    The problem is that the connection API takes in charge only two parameters for custom authentication: user name and password. How can I switch the APP_ID to authentication?

    Thank you for your help.

    Christian

    Published by: France Christian February 23, 2010 06:23

    Published by: France Christian February 23, 2010 06:24

    It is sometimes easier to check the user before calling the connection custom Apex then past just a password to NULL to the connection works if the check fails. Something like that before the connection:

    DECLARE
    v_dummy NUMBER;
    BEGIN
    SELECT 1
    INTO v_dummy
    FROM acl_employees
    WHERE upper(userid) = upper(p_username)
    AND application_id = :app_id;
    EXCEPTION WHEN NO_DATA_FOUND THEN :P58_PASSWORD := NULL;
    END;
    
  • How to check for the ConnectionState of ESX hosts

    Hello

    I would like to be able to check the status of connection to a host list before executing a block of code against the list of hosts. If the host is in a disconnected state, I want also to write in a name csv file and connection status of any host that is disconnected before you run the code block against the rest of the hosts in the list.

    That's what I've tried so far:

    $ESX = "C:\Temp\host.txt".

    foreach ($vhost to $ESX)

    Get-VMHost $ESX | Select Name, ConnectionState
    If ($vhost. ConnectionState - eq 'offline') {}

    {
    $vhost | Export-CSV "C:\Temp\report.csv" - NoTypeInformation
    }
    }

    Thank you

    Try like this

    $ESX = "C:\Temp\host.txt".

    Get-VMHost-name $ESX |

    Where {$_.} ConnectionState - eq 'offline'} |

    Select Name, ConnectionState |

    Export-CSV "C:\Temp\report.csv" - NoTypeInformation

  • How to check for the plan of the historic explain SQL 10 g command

    Hello

    It is a way to check the history of sql explain plan?

    Is this possible via sql? I can check it using OEM but... I would like to know if this can be done through sql.

    Thank you
    Jams

    Findout the sqlid to awr.

    SELECT * from TABLE (dbms_xplan.display_awr ('br7hhp7m0qauk'))

    HTH

    Mathieu

  • Check for the empty table row before adding the date

    On the form below, when I click on the green button (extreme right) plus a new row in the table is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text that the user entered is removed and today new is added because it is in the intialize event. How do I script to check and make sure that each dated line is empty before you add today's date?

    https://Acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw

    Thank you

    ~ Gift

    Hi Don,

    One possibility would be to use the box caption of the textfield for the date and leave the value part free for the user to enter their data:

    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    }
    

    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.

    Hope that helps,

    Niall

  • How to check if the database for DRDA gateway is installed and configured.

    Hi all

    How can we check if the database for DRDA gateway is installed and configured.

    Our operating system is AIX 5 L 64 bit OS.
    RDBMS: 11.2.0.3

    Kind regards

    Duplicated
    How to check if the database for DRDA gateway is installed and configured.

    + - locked thread-+.

    Nicolas.

  • How can I get the lines for the date between 2 different days

    Hi all,

    How can I get the lines for the date between 2 different days.

    Sample data:
    Table name: Articles
    Title start_date end_date
    Heading1 08-22-2011 2011-09-11
    2011-08-01-2011-09-01 Title2
    Title 3 2011-08-21 08-21-2011
    title4 2011-08-28 2011-09-11

    Result will be:
    Title start_date end_date
    Heading1 08-22-2011 2011-09-11
    2011-08-01-2011-09-01 Title2
    title4 2011-08-28 2011-09-11

    This is my example query:
    SELECT * FROM items WHERE trunc (es.date_start) > = TO_DATE('2011-08-22', 'YYYY-MM-DD') AND trunc (es.date_end) < = TO_DATE ('2011-08-28', 'YYYY-MM-DD')

    but I can not get the expected results. Any help would be much appreciated.

    Thanks in advance

    not read your question properly before...

    Please try this

    Select * FROM items
    WHERE (TO_DATE ('2011-08-22', 'YYYY-MM-DD') between TRUNC (es.date_start))
    AND TRUNC (es.date_end)) OR
    (TO_DATE ('2011-08-28', 'YYYY-MM-DD') between TRUNC (es.date_start))
    AND TRUNC (es.date_end))

  • How to write a query for the data exchange between two columns?

    How to write a query for the data exchange between two columns?

    I tried a request, does NOT work.
    update tmp t1 set t1.m1=t1.m2 and t1.m2=(select t2.m1 from tmp t2 where t2.student_id = t1.student_id)
    Thank you.

    Published by: user533361 on October 23, 2009 14:04

    Just plain and simple:

    update tmp t1
     set t1.m1=t1.m2,
         t1.m2=t1.m1
    /
    

    SY.

  • How can I get the data view to display the same amount of time I save?

    I use the Sound and Vibration Measurement Suite.  In the data view, I display a graph of time, the power spectrum, the Color Map and the waterfall.  I am also showing strength in numbers group for several bands and doing cutting-edge research.  I record 100 ms of the transient wave.  In the data view, why the temporal plots show several seconds of data?  What determines how much time will appear in the data view?  More important, the power spectrum reflects the power for the entire of several seconds of data displayed?  Same question for power in the values of band and cutting-edge research.  I want to just this data displayed for 100 ms of the wave that I record.  So, how can I get the data displayed (waveforms) and power numbers come only 100 ms of the recorded wave?

    Finally, what is the best way to make account concisely the recorded data?  By slide numbers on the Documentation tab is not concise, because it comes with graphics, etc..  I tried save as ASCII/LVM, but I get a bunch of stuff intermiated I don't care.  Help?

    Hi TimRsandiego,

    SignalExpress is programmed to display graphs with default scales based on the type of action, it's reading. These scales and settings can be changed by right-clicking on the graph, and then select Properties.

    If you are interested to learn more about how to use SignalExpress, I would recommend checking out some demonstrations/tutorials on NI.com. You can find some of these demos at the following location:

    Let me know if you have any other questions.

    Kind regards

  • cant serch for the dates... ERROR_80004002 keeps coming back?

    As I said in the title I can not serch for the dates, I get error 80004002

    cannot find answer for this error and has never had this problem before?

    anyone in the know that I could use some answers... lol

    Hello

    Method 1:

    I suggest you to see the links and check.

    Error message when you try to install updates by using Microsoft Update or Windows Update Web site: «0 x 80004002»

    http://support.Microsoft.com/kb/956708

    Problems with installing updates

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-installing-updates

    Method 2:

    I also suggest you to run the System File Checker

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

  • Vista initilalize usb disk... How can I backup the data?

    My usb cable was disconnected during moving the files from a [URL = http://www.seagate.com/www/en-gb/products/external/expansion/expansion_desktop/] external expansion of 3 TB Seagate USB Drive. [Url] to my drive is internal. Now Vista sees is no longer the USB in the Explorer. I went in the Adim tools/disk management & demand if I want to 'initialze disc' which gives two options "use the following disk partition style" MBR or GPT. At this point, I chose to leave the application I have I'm not sure what the difference is. Either option would allow me to access the data on the disk? If this is not the case, how can I retrieve the data already stored on the disk?

    Hello

    Refer to this link and run the troubleshooter and check:

    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-solving-problems-with-USB-devices

  • Check for the existing index

    I'm a DBA working with 3 application developers, they want to know how to check for existing indexes for some columns
    in a table in their schema.

    a friend told me to check the existing index for some column you have to query
    view dba_ind_columns so you must be a sysdba user

    but I don't want to give the developers of the application of the privilege sysdba

    but my friend told me, to avoid sysdba grant for application developers, they can query the user_indexes view in their scheme, but after watching the user_indexes view,.

    It gives me a lot of data but does not give me the NAME of COLUMN

    How can I solve this problem, which is:

    Let application developers check existing indexes for some columns in their schema without granting them sysdba privilege.

    user_ind_columns

  • How can I restart the date and time?

    The date and time on my task bar have become desensitized. How can I restart the date and time?

    I can't access the same system for the date and time preferences.

    Have you tried restarting your Mac?

    See you soon,.

    GB

Maybe you are looking for