Add the Month function

Hello
I have fields of database (Advance_issue_date, Repay_start_date). I spent sysdate in Advance_issue_date and then I want to give my gap of a month of aleast Repay_start_date date for this purpose, I used add month in insert trigger function before the recording of these two dates have a month, or not of the gap, if not then inform the user other wise it enter the date, it adds a month function works well but only one problem with it am I want to delete.
It is:
If Advance_issue_date is 29/05/2009 then I enter the Repay_start_date date is 30/06/2009. (can give more value, this isn't problem)

but I want dates like this:
Advance_issue_date is repay_start_date 29/05/2009 to 29/06/2009.

any help...

Thanks in advance
Kind regards

You may even write select statement

If: EMP_ADVANCE. ADV_ISSUE_DATE is not null then
If: EMP_ADVANCE. REPAY_START_date< addmonths(:emp_advance.adv_issue_date,1)="">
message ("can not enter date less than ' |") AddMonths(:EMP_ADVANCE.) ADV_ISSUE_DATE, 1));
raise form_trigger_failure;
end if;
end if;

Tags: Oracle Development

Similar Questions

  • Is it possible that we can add the search function?

    Hello

    Is it possible that we can add the search function so we can search if the files sent to the front specific e-mail address?

    Without the search functions, it is very difficult to know if he was sent to nobody in particular, saw that expands the list of sent people.

    Kind regards

    Jim

    Hi decommoditizer,

    I'm sorry, there is no such function to find whether or not a particular file has been sent to a person in particular.

    You go through the emails individually research.

    However, you can maintain a database in Excel or another application note which file is send by the user.

    Kind regards

    Nicos

  • Add the search function

    Help! I need to add a search function to my site. Using Dreamweaver CC 13.2

    I know that I need to create a page resulting will be placed and another page in which I create the form.  Can someone point me to a tutorial or other assistance?

    Thank you!

    Barbara

    This happens frequently here.

    Here is a discussion which may help: How do I search in my site

  • How to add the collapsible functionality to the Spry Menu?

    Dear Adobe community,

    How to add the functionality of collapsible for the Spry Menu like the one on the White House | whitehouse.gov ?

    Load the White House Web site and minimize your browser window as observe you what happends to the menu bar when you pass a certain limit.

    This is the feature that I want to put in place and I would be happy if one of you could direct me to or share relevant information.

    Concerning

    Andreas

    This isn't a menu Spry Spry do not appear on mobile devices.

    Use any sensitive menu you like for example:

    CSS & jQuery Mobile Navigation Menu Demo

    The tutorial is here:

    CSS and jQuery Menu of Navigation Mobile reactive

  • How to add the delete function to a report that is already created?

    Hey, guys:

    I'm not familiar with the form relative to the APEX. I have a lot of forms with the reports that has been created before, but they only create buttons. Now I need to add, edit and delete buttons. I wish I didn't have to recreate forms with reports. But when I tried to add the Remove feature by comparing a form with button Delete created by APEX, but it does not work. remove the button does not respond.

    parameter is as follows:

    style button: button model based
    model of button: button
    button type: normal

    Action: redirecting to a URL
    Run validation: No.
    Target URL: javascript:apex.confirm (htmldb_delete_message, 'DELETE');
    action of databases: SQL delete action

    condition type: point value / column in expression1 is not null
    expression1: P2172_ALIAS_ID

    I also activate the deletion in process: "SOR_ALIAS line process. '


    If I set the action of the button delete that submit the page, I can delete the line, but no standard popup alerts, could someone help me on this?

    Thank you.

    Sam

    Hello

    When you try to reproduce your problem, since all you posted was going well for me, I came across an error that htmldb_delete_message was not defined (you could check your browser console, usually by pressing F12 and select the console tab to see what happends when you press the button).
    Perhaps this is also the case in your configuration, simply replace the URL target with the text below to see if that's the problem.

    JavaScript:apex.confirm ("are you sure you want to delete this record?","REMOVE" ');

    Concerning
    Bottom

  • My Contacts from Windows Vista file has no control of import or export on the toolbar, and then I can not follow the Guide help to initiate the sequence of import. Does anyone know how to add the import function in the toolbar.

    Ideas:

    • Problems with the Contacts on Vista
    • No error message
    • Never used this feature before
    • What you have already tried to solve the problem

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    The Contacts folder is sometimes forgotten how to display contacts, see if this helps:

    1. open Windows Contacts
    2. right-click anywhere in the right pane.
    3. Select "Properties" at the bottom of the list
    4. click on the tab 'Customize' on the 'Properties' page that opens.
    5. change the 'Type', 'Contacts' folder

    New Contact"and"Contact Group on new"button missing 

    HAL
    --
    HAL Hostetler, TCE
    Engineer senior/UPDATED--MS MVP-Print/Imaging - WA7BGX
    www.kvoa.com - KVOA television, Tucson, AZ.
    Live Hot Licks - www.badnewsbluesband.com

  • Add the function of scan for Officejet 4500

    I have a HP Officejet 4500 G510N-Z (wireless) which is used for copying and faxing.  I need to add the analysis function but do not know if I have to uninstall everything and use the CD to reinstall.  I remember well, the center of Solution kept defective, and Geek Squad reinstalled just so I could copy and fax.  In programs & features, the HP and HP Imaging Device functions 13.0 solution Center are listed, but there is no info under 'size', and when highlighted, nothing happens when I click on uninstall.

    Can I use the CD for just activate the scan function?  If not, where is the instructions to uninstall everything in ones 'level 3' as I've heard of?

    Windows 7 64 bit

    HP Pavilion g7-1310

    Thank you.

    Hello jcb1919.

    Uninstallation of level 3 are on the CD supplied with the printer. Explore the disc and look for the "util" folder Then inside this folder find the file 'ccc '. L3 you mentioned is located at the bottom of this file. Be sure to unplug and cables USB (if you use) before the uninstall. I hope this helps.

  • How can we display the name of the month in an analysis?

    Hello world

    I had a requirement to display the values of column, January, February, March...
    where are the values I have in date format. and I also show the names of months in sorting like jan, Feb, March, April, etc..
    To do in 11g. Please someone help me to solve this.


    Thank you

    Hello

    First you must add the monthname function in the formula in the column. This will give you the names of months.
    Ex-MONTHNAME("Cal Date")

    Add bin to sort, or write some case statements in the other column and sorting.
    Ex-CAs
    When MONTHNAME ("Cal Date") = "Jan" then 1
    When MONTHNAME ("Cal Date") = "February" then 2
    ...
    ...
    end

    Hope this helped / replied

    Concerning
    Young

  • Count on column month function gives bad result

    Hello

    I'm on OBIEE 11.1.1.7.150120.

    I used the count on the column for the month function and instead of getting 12 as the answer I get 365. (I used a filter on the column year to restrict to one year)

    How could it happen?

    Any help would be appreciated.

    A count on your back 1661600 fact table is not strange because it is normal to have a ton of lines (zero, one or more for each value of your dimensions).

    If you look at the physical SQL what is it? 365 days is because of 1 line of time Sun has multiple matches on your fact table or is dim because your time is at the level of the day (again 365 is really a strange number: exactly the number of days in the year...).

    But the distinct count is your solution, because as soon as your will a request using your time and dimension of any other table with County you will count the number of lines and not the number of months.

  • With variable presentation month() function

    Hi all

    How can I use the MONTH() function in column answers, with variable presentation? I need to get the date month.
    I tried MONTHS (' @{tmp_date}' as date) but it doesn't work I get the error message.

    Thank you

    Hello

    If you select a single date value... go invite... then...
    Just keep filter on is invited to date column criteria of special relationship...

    Now, in the criteria take the same date column and apply * months ( column date ) *.

    So this column has the value selected and taken months of that particular date...

    try it this way...

  • Add the time interval to the date function

    trying to create a function that would add days, months + years to any date that we would provide.
    try to make this work-i know there is a plethora of potential problems with this.

    One of my fav Msgs guard jump me: ' WARNING: function created with compilation errors. "
    line 7 is the problem no doubt - data types.



    ------------------------------------------------------------
    create or replace function nextexit)
    p_date as p_years entire p_months entire, p_days in full)
    date of return
    is
    v_nextexit date (30);
    Start
    v_futuredate: = p_date + INTERVAL p_years YEAR p_months MONTH INTERVAL INTERVAL p_days DAY;
    Return v_nextexit;
    end;
    /
    -----------------------------------------------------

    (otherwise I tried to use the add_months/add_years/add_days functions, but it seems that only the work of a second?)

    any help is appreciated!

    Hello..

    Try this:

    CREATE OR REPLACE FUNCTION nextexit(
       p_date    IN  DATE,
       p_years   IN  INTEGER,
       p_months  IN  INTEGER,
       p_days    IN  INTEGER
    )
       RETURN DATE IS
       v_futuredate  DATE;
    BEGIN
       v_futuredate   :=
            p_date
          + NUMTOYMINTERVAL(p_years, 'YEAR')
          + NUMTOYMINTERVAL(p_months, 'MONTH')
          + NUMTODSINTERVAL(p_days, 'DAY');
       RETURN v_futuredate;
    END;
    
    SELECT nextexit(TRUNC(SYSDATE),
                    1,
                    2,
                    1
                   )
    FROM   DUAL
    
  • Add the sign in / log function to a Web site.

    Hello! On my site, I want to add the functionality of a user to use the connect/disconnect. Basically allowing them to have their own "account" on my site. Although it may seem difficult, I'm sure that I can understand it. If you could provide me with recommendations on where to start with something like this it would be great. Is there an easy way to do it on bootstrap? That this has something to do with sql? I just want to know where to start with this kind of thing.

    Thank you very much!

    Read PHP Solutions by David Powers. The final chapter offers a log-in system almost complete.

  • Function to retrieve the first day of the month.

    Select (sysdate, 'IW') of double

    I know it takes the date of Monday. Is there a function like above that has the date of return to the first Monday of the month?

    Thanks in advance.

    Hello

    NEXT_DAY is very convenient, but it is dependent on the NLS_DATE_LANGUAGE, and you cannot pass an argument to override that.
    TRUNC (dt, 'IW') is not in the NLS settings, then you may prefer this:

    TRUNC ( 6 + TRUNC (SYSDATE, 'MONTH')
          , 'IW'
          )          AS first_monday
    

    1st Monday of the month is fixed to the Monday or before the 7th of the month.

  • Abbreviated month by using the MonthAsString function

    Does anyone know of a way I can get the month abbreviated by using the MonthAsString function?

    I tried #MonthAsString (MyNumber, "MMM") # but it did not work.

    Thank you

    monthAsString (monthNumber) is just, well, a string - use the left() function to get the 3 main characters:

    #left (monthAsString (monthNumber), 3) #.

  • How to add the warning message when you use the function 'print' in Adobe LiveCycle Designer

    I'm trying to make the pdf document for my business that requires the addition of a warning message while everyone to use the function 'print' page...

    Does anyone know how to add the warning message about LiveCycle Designer

    Also my supervisor mentioned something using "nag" If that sounds at all

    Not in the XML code, in the case of script of pre-publication of the "print" key. If you don't have the script editor to the top on your version of designer, you can press ctrl + shift + F5 to bring it.

Maybe you are looking for