How To validate Date of Birth and Sysdate

Hi friends,
I want to compare day and month in date of birth and day and month in sysdate if both are equal i want to display some message like 'Happy Birthday' is there any possibility please let me know
Regards
Anusha

Hi,
Some thing like e.g.
IF TO_NUMBER( TO_CHAR( l_your_date, 'MMDD') ) = TO_NUMBER( TO_CHAR( SYSDATE, 'MMDD') ) THEN
END IF;
In future it is better post these pure SQL and PL/SQL question to SQL and PL/SQL space
Regards,
Jari

Similar Messages

  • How to validate date between Header and Detail Block..

    Hi All,
    I was trying to find a way where, suppose I enter 'from date' and 'to date' in the header block.then in detail block all 'from dates' and 'to dates' should be restricted between the dates entered in the header block.
    Thank you

    Or U Can Simply set in the child item lowest / highest Allowed Value
    Invoke Property pallete for child date item and set the following
    lowest Allowed Value :header.from_date (must be prefix with :)
    Highest Allowed Value :header.to_date
    siju.koiply

  • Validate date of Birth

    How I can validate date of birth?
    Month-Date-Year
    Example: 11-21-1960
    Thanks

    You could use a regular expression:
    E.g.
    var dateRegExp = "^(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])-(19|20)\d\d$"; // mm-dd-yyyy
    if (oField.rawValue.search(dateRegExp) === -1) {
         // error!
    Or you could use a date object as suggested in the previous post, but also stop the user from typing in a date so they will be forced to use the date selection box. This would ensure that the date is always in the correct format. To stop the user from typing in data, put the following code in the change event for the field:
    if (xfa.event.change.length == 1) {
    xfa.event.change = "";

  • How to validate XML against XSD and parse/save in one step using SAXParser?

    How to validate XML against XSD and parse/save in one step using SAXParser?
    I currently have an XML file and XSD. The XML file specifies the location of the XSD. In Java code I create a SAXParser with parameters indicating that it needs to validate the XML. However, SAXParser.parse does not validate the XML, but it does call my handler functions which save the elements/attributes in memory as it is read. On the other hand, XMLReader.parse does validate the XML against the XSD, but does not save the document in memory.
    My code can call XMLReader.parse to validate the XML followed by SAXParser.parse to save the XML document in memory. But this sound inefficient. Besides, while a valid document is being parsed by XMLReader, it can be changed to be invalid and saved, and XMLReader.parse would be looking at the original file and would think that the file is OK, and then SAXParser.parse would parse the document without errors.
    <Book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd" name="MyBook">
      <Chapter name="First Chapter"/>
      <Chapter name="Second Chapter">
        <Section number="1"/>
        <Section number="2"/>
      </Chapter>
    </Book>
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Book">
    <xs:complexType>
      <xs:sequence>
       <xs:element name="Chapter" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="Section" minOccurs="0" maxOccurs="unbounded">
           <xs:complexType>
            <xs:attribute name="xnumber"/>
          </xs:complexType>
          </xs:element>
         </xs:sequence>
         <xs:attribute name="name"/>
        </xs:complexType>
       </xs:element>
      </xs:sequence>
      <xs:attribute name="name"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    public class SAXXMLParserTest
       public static void main(String[] args)
          try
             SAXParserFactory factory = SAXParserFactory.newInstance();
             factory.setNamespaceAware(true);
             factory.setValidating(true);
             SAXParser parser = factory.newSAXParser();
             parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
                                "http://www.w3.org/2001/XMLSchema");
             BookHandler handler = new BookHandler();
             XMLReader reader = parser.getXMLReader();
             reader.setErrorHandler(handler);
             parser.parse("xmltest.dat", handler); // does not throw validation error
             Book book = handler.getBook();
             System.out.println(book);
             reader.parse("xmltest.dat"); // throws validation error because of 'xnumber' in the XSD
    public class Book extends Element
       private String name;
       private List<Chapter> chapters = new ArrayList<Chapter>();
       public Book(String name)
          this.name = name;
       public void addChapter(Chapter chapter)
          chapters.add(chapter);
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("<Book name=\"").append(name).append("\">\n");
          for (Chapter chapter: chapters)
             builder.append(chapter.toString());
          builder.append("</Book>\n");
          return builder.toString();
       public static class BookHandler extends DefaultHandler
          private Stack<Element> root = null;
          private Book book = null;
          public void startDocument()
             root = new Stack<Element>();
          public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
             if (qName.equals("Book"))
                String name = attributes.getValue("name");
                root.push(new Book(name));
             else if (qName.equals("Chapter"))
                String name = attributes.getValue("name");
                Chapter child = new Chapter(name);
                ((Book)root.peek()).addChapter(child);
                root.push(child);
             else if (qName.equals("Section"))
                Integer number = Integer.parseInt(attributes.getValue("number"));
                Section child = new Section(number);
                ((Chapter)root.peek()).addSection(child);
                root.push(child);
          public void endElement(String uri, String localName, String qName) throws SAXException
             Element finished = root.pop();
             if (root.size() == 0)
                book = (Book) finished;
          public Book getBook()
             return book;
          public void error(SAXParseException e)
             System.out.println(e.getMessage());
          public void fatalError(SAXParseException e)
             error(e);
          public void warning(SAXParseException e)
             error(e);
    public class Chapter extends Element
       public static class Section extends Element
          private Integer number;
          public Section(Integer number)
             this.number = number;
          public String toString()
             StringBuilder builder = new StringBuilder();
             builder.append("<Section number=\"").append(number).append("\"/>\n");
             return builder.toString();
       private String name;
       private List<Section> sections = null;
       public Chapter(String name)
          this.name = name;
       public void addSection(Section section)
          if (sections == null)
             sections = new ArrayList<Section>();
          sections.add(section);
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("<Chapter name=\"").append(name).append("\">\n");
          if (sections != null)
             for (Section section: sections)
                builder.append(section.toString());
          builder.append("</Chapter>\n");
          return builder.toString();
    }Edited by: sn72 on Oct 28, 2008 1:16 PM

    Have you looked at the XML DB FAQ thread (second post) in this forum? It has some examples for validating XML against schemas.

  • How to change data source name and context root during deployment

    Hi,
    Env:
    WLS 10.1.3
    JDev 11.1.1.6
    Hudson
    I need to deploy two instances of my ADF application on the same development enviroment. We are using Hudson to deploy. My question is how to change data source name and application context root before second deployment.
    Kuba

    I don't believe there is an inbuilt facility to do this.
    Previously how I've done this is when checking files out using Hudson jovs, before the build I then use an Ant extension called XmlTask (http://www.oopsconsultancy.com/software/xmltask/) to modify the required XML files.
    Can I ask why you're doing this in the first place please? Multi-tenancy? 2 versions of the same app?
    CM.

  • How to validate Date

    Hi,
    We have a date field in the form. I am validating date format as YYYY-MM-DD, validation works fine. But If user enters invalid date, how to validate date? For examples:
    2006-02-31 It is an invalid date. How can i validate it.
    If anybody have sample code, it will help me a lot.
    thanks
    Neopal.

    Hi Neopal,
    You can use something like the following to test the date is valid, use the validation event on the <Field> which you want to validate to call a Rule something like this (not complete)..
      <Rule name='isDateValid'>
            <RuleArgument name='date'/>
            <block>
           <script>
              var dateToTest = env.get('date');
              var formatter = new java.text.SimpleDateFormat('YYYY-MM-DD');
              Date validDate = formatter.parse(dateToTest);

  • How to sinck data between  production and R12 instance

    Hi,
    I am working on Oracle Apps up-gradation project.
    Now I have upgrade 11.5.7 to R12 (12.0.4) successfully. I started up-gradation task with 1 May of production data (backup) on new machine.
    Client wants to live R12 from 1/August/2009.
    Please suggest how to sinck data between production and R12 instance.
    Thanks
    Anup

    Hi,
    It is not possible to do what you propose (sync data from an 11.5.7 system to a 12.0.4 system). You will need to re-run the upgrade against the August 1 data, following your original upgrade procedures.
    Regards,
    John P.
    http://only4left.jpiwowar.com

  • How to load data to dimensions and fact table is it simialr to sql server

    How to load data to dimensions and fact table in a data ware house environment, is it simialr to sql server, oracle?
    Never migrated or loaded data to datawarehouse server.
    I have an interview and am really confused if they ask anything related to the dataware house side elements.
    Coudl you please if you don't mind provide me some steps and dimension and fact table info, an example only.
    Atleast for my knowledge.
    Thank you very much for the helpful info.

    Some discussions in previous forums should help you
    http://forums.sdn.sap.com/thread.jspa?threadID=2019448
    http://forums.sdn.sap.com/thread.jspa?threadID=1908902
    In the SAP tutorial, you can see a sample example of making fact tables.
    http://help.sap.com/businessobject/product_guides/boexir32SP1/en/xi321_ds_tutorial_en.pdf
    Arun

  • How can validate the ASM size and free space correctly?

    Dears ,,
    I faced problem in ASM size as it appeared in alert file as below
    ORA-19504: failed to create file "+DG_DATA"
    ORA-17502: ksfdcre:4 Failed to create file +DG_DATA
    ORA-15041: diskgroup space exhausted
    So we resize ASM space and large it. But we faced the same problem also although there is free space in ASM.
    It seems that the shown free space is not real.
    How can validate the ASM size and free space correctly?
    Thanks & Regards,,

    *Oracle DBA* wrote:
    Dears ,,
    I faced problem in ASM size as it appeared in alert file as below
    ORA-19504: failed to create file "+DG_DATA"
    ORA-17502: ksfdcre:4 Failed to create file +DG_DATA
    ORA-15041: diskgroup space exhausted
    So we resize ASM space and large it. But we faced the same problem also although there is free space in ASM.
    It seems that the shown free space is not real.
    How can validate the ASM size and free space correctly?
    Thanks & Regards,,
    I was having this problem. Im my case i couldn add datafiles to a tablespace despite the fact that i was having a lot of space in the asm. Try rebalancing. It might help. In my case rebalancing also didn work because it seems that there need to be a threshold space in all the disks for the rebalancing to happen which was not in my case, so i had to shrink some unused space in the tablespace and then after gaining the required space I rebalanced the disk and then the disks got rebalanced, also i was able to use the free space that was showing .

  • How to extract data via webservices and configure webservices in BI 7

    Hi to all,
    Can any body tell me How to extract data via webservices and configure webservices in BI 7.
    i have created a remote functionmodule which extract data from R/3 , now i want to upload data to BI 7 using that remote function module.
    i have use webservice (push) as adapter mode, as i want to connect function module with SOAP , via web services.
    please can any body tell how to do that.
    also how to configure the webserive , what is it .
    I SHALL BE THANKFULL TO YOU FOR THAT
    Regards
    Pavneet rana

    Hi,
    1. Using the function library (transaction SE37), call the Web service creation wizard.
    To do this, select the desired function module in the function library and choose Utilities ®Generate Web Service ® From the Function Module.
    2. Go through the following steps, shown in the wizard:
    a. Create a virtual interface.
    The virtual interface represents the interface between the Web Service and the outside.
    b. Choose the end point.
    The name of the function module that is to be offered as Web service is already entered here.
    c. Create the Web service definition.
    The Web service definition helps with assigning the Web service features, such as how security can be guaranteed in data transfer.
    d. Release the Web service.
    The wizard generates the object virtual interface and Web service definition in the object navigator.
    The function group that was generated when the XML DataSource was created is not transportable and is thus assigned to a local package. To prevent errors due to transports, make sure that the objects that were generated in the Web service creation wizard are assigned to a local non-transportable package.
    The Web service is released for the SOAP runtime.
    3. In the virtual interface for the import parameter DATASOURCE, define the name of the XML DataSource as the fixed value.
    A separate function group is generated for each XML DataSource. It makes sense to pre-assign the parameter DATASOURCE with the name of the XML DataSource in the virtual interface of the Web service for which the function group was generated.
    If you do not pre-assign the parameter, it will be necessary to transfer the data sent with the appropriate filled DataSource element, for example, by setting the value in the application that implements the Web service.
    a. In the object navigator, choose the name of the package in which the Web service was created and choose Enterprise Services ® Web Service Library ® Virtual Interfaces.
    b. Choose Change in the context menu for the virtual interface.
    c. For the virtual interface, remove the flags exposed and initial and enter the name of the XML DataSource in apostrophes, for example u20196ADATASOURCENAMEu2019.
    d. Activate the virtual interface.
    Regards,
    Marasa.

  • How to normalize data in BW and in Bex Report

    Hello Experts,
    Could you please clarify me with the followings please?
    1. How to normalize data in BW and in Bex Report?
    2. What are the best designs for data normalization and where?
    3. What are the advantages and disadvantages for BW data normalization / denormalization?
    Need your guidance and will appreciate help.
    Thanks in advance.
    Regards,
    Bhakta

    Hi,
    You can do this in the report. See here for details:
    http://help.sap.com/saphelp_nw04s/helpdata/en/1f/25883ce5bd7b1de10000000a114084/content.htm
    Hope this helps...

  • Please expose the employee ID field in ADUC in this version, also add a field for data of birth, and present both on the change password form so we can validate a user's identify when they ring up for a reset.

    Considering Active Directory is supposed to be all about business, corporations and enterprises, I find it staggering that in 2015 the ADUC console STILL does not expose the Employee ID field in the default UI without having to dig into the attribute editor.
    And then only if you browse to the user in their OU, the Attribute Editor tab is missing when you just search for the user. This isn't really helping our organisation. I've just setup the tech preview version of the new server version, and that doesn't expose
    it either.
    I'm not sure how other organisations handle this (suggestions please?), but when a user rings up the service desk for a password reset, we either have to keep them on the phone while we dig into their user account and look for the Employee ID for them to
    then confirm on the phone, or just take it on blind faith that they are who they say there are.
    Please for the love of all deities, can you expose the Employee ID field on the main user panel without having to dig into attribute editor. It would also be useful to show this information directly on the reset password dialog box so there's no looking
    up required. While you're at it, please can you add a date of birth field (if it isn't already there, I never seen one), and expose this on the main screen for the user, as well as the reset password box. This would give us two pieces of information to verify
    the identity of the user on the phone.
    All that being said, if anybody has a better way of identifying users on the other end of the phone, I'm all ears.
    Thanks in anticipation.

    Personally we use the AD selfservice plugin for manageengines service desk plus.

  • How can I validate data after writing and over reboot/powercycle?

    Hi,
    How can I validate data after writes are done? How can I validate data after reboot or powercycle of the machine is done?
    What are the options I should give while running vdbench? When should I use -v, -vq, -vt, -v -j, -vq -j, -vq -jr, -v -jr options?

    Please look for the "Data Validation and Journaling' chapter in the documentation.
    Henk.

  • User Name, Date of Birth field / sysdate

    hi! I am writing a procedure/dynamic page to check the logged in person's birthday but has encounterd some problems:
    1. draw these data from the wwsec_person$ table? if i just use
    Select User Name, Date of Birth from portal30.wwsec_person$, it gives me some error, i tried put [] brackets but still the same.
    2. how do i format the sysdate and Date of Birth to to month, day?
    3. how do I run a procedure automatically when someone has logged into the portal?
    thx.

    1) Please provide the full error message, and snippit of code surrounding the error.
    2) TO_CHAR ( SYSDATE, 'Mon, DD' ) -- Read about TO_CHAR
    3) Read about SYSTEM TRIGGERs
    http://technet.oracle.com/docs/products/oracle9i/doc_library/901_doc/appdev.901/a88876/adg13trg.htm#431
    CREATE OR REPLACE TRIGGER someTriggerName
    AFTER LOGIN ON ([someSchemaName.]SCHEMA or DATABASE)
    DECLARE
    BEGIN
        -- Run procedure here User name is in SYSTEM
        --  variable LOGIN_USER.
    END;Good Luck,
    Eric Kamradt

  • How to Child Date of Birth on Child's iCloud Account

    Today I've created an iCloud child account / Apple ID for my 12 year old son who's just saved up and bought himself an iPad Mini (cue one very excited boy!) Unfortunately, when creating his Apple ID I accidentally set his year of birth to 2015 instead of 2003 so it's now showing him as being 1 month old.
    It appears that Apple won't allow me to delete his iCloud account from my family group so can anyone advise how I can either get round that restriction in order to delete his account and create a new one or how I can correct his date of birth?
    Thanks.

    Hi, I'm having the same issue. Trying to change my nephews birthday so that I can link him to my account but... 'Manage your Apple ID' can't change the date, it tells me "You cannot change your birthday at this time.". I notice that I can not change the birthday of my nephew so that he is younger than 13 years of age. I presume that this is a safety feature, good. However, how do I make this change with the necessary credentials?
    Thank you Apple.

Maybe you are looking for