Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Calculate Month in between two columns and Multiply between
????? ????
May 24 2014 9:42 AM
926
Reply
ApplicantName || Amt || Date of Opening
Mr. Abc..............||..500....||..1 Jan 2014
1) I have to calculate the total months from 'Date of Opening' to 'Current Date'
I did like this :-
Select ApplicantName,Amt,DateOfOpening,DATEDIFF(month, DateOfOpening, GETDATE()) AS Month from ApplicantInfo
I got this result -
ApplicantName || Amt || Date of Opening|| Months
Mr. Abc.............||..500..||..1 Jan 2014........|| 5
(This works currectly)
2) Now i want to add another extra column for calculation this.
Total Amt = Amt * Months (i.e. 500 * 5)
How I can do this?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to fetch recently added record in sql
sql function help