Adsense
Popular Posts
- Install APXS in Redhat Linux
- MySQL workbench -"Could not decrypt password cache"
- Transfer modules between sites
- JavaScript, remove trailing insignificant zeros after toFixed function
- Set Windows path command line
- datatable order by nunmeric
- MySQL date created and date modified
- super(props) in React
- PHP, dump varailbes in a format way
- React: connect(mapStateToProps, mapDispatchToProps)
Thursday, November 29, 2018
MySQl, current date add 2 months
MySQl, current date add 2 months
DATE_ADD(CURDATE(), INTERVAL (2) MONTH)
Example:
SELECT fhs.Term AS term,s.Stakeholder_id AS stakeholder_id FROM `fm_sita_historical` AS fhs
INNER JOIN
stakeholders AS s
ON s.Emplid = fhs.SFU_ID
UNION
SELECT semester AS term,stakeholder_id FROM `contract_si_ta_percourse`
WHERE cancelled='N'
AND (block='Y' OR gblock ='Y' OR cblock ='Y')
AND semester <(
SELECT `Term`
FROM terms_lut
WHERE DATE_ADD(CURDATE(), INTERVAL (2) MONTH) BETWEEN StartDate AND EndDate )
Labels:
MySQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment