Solved

how to find due date

Posted on 2011-03-15
4
373 Views
Last Modified: 2012-08-13
Dear all
In my employee data i have the following
joindate, basic salary. After every year from join date i have to pay one basic salary along with the monthly salary.

When preparing the monthly salary, what is the best method to  find out which are the people basic salary is due on that particular month.

0
Comment
Question by:bmkdubai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 35136603
I would start to compare:
to_char(sysdate, 'MM') = to_char(joindate, 'MM')

it could be +- 1 month (cf add_months function) ...
note that to_char returns a string, and not a number ...
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 35136606
months_between(trunc(sysdate),join_date) in (12,24,36,48,60...) >=  then pay one more month basic sal along with the salary.

There are many ways to do this. That is just one method.
0
 
LVL 32

Expert Comment

by:awking00
ID: 35138324
where mod(months_between(trunc(sysdate,'mm'),trunc(joindate,'mm)),12) = 0
0
 
LVL 32

Expert Comment

by:awking00
ID: 35138377
Missing a quote -
where mod(months_between(trunc(sysdate,'mm'),trunc(joindate,'mm')),12) = 0
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question