In Oracle, you can use ADD_Months to add months on the fly in the sql statement. What is the MS SQL version.
Oracle Example
Select TestDate,
TestFrequency,
ADD_MONTHS(TestDate, TestFrequency) AS FutureTestDate
FROM Tests
Source : java's website
4条答案
按热度按时间pcrecxhr1#
Its
DATEADD(MONTH, TestFrequency, TestDate)
to addTestFrequency
number of months to the date fieldTestDate
.2vuwiymt2#
SQL Server's TSQL equivalent to Oracle's PLSQL ADD_MONTHS function is DATEADD :
5lhxktic3#
I'm not exactly sure how Oracles Add_Months works, but MS Sql has this:
prdp8dxp4#