TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
????? ????
NA
2
2.2k
Calculate Month in between two columns and Multiply between
May 24 2014 9:42 AM
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?
Reply
Answers (
1
)
How to fetch recently added record in sql
sql function help