?
Solved

how to find due date

Posted on 2011-03-15
4
Medium Priority
?
375 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 2000 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
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.
Suggested Courses

752 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