1
嘗試運行一個查詢,該查詢將在某個日期之後返回所有數據。日期設置爲varchar而不是日期。SQL查詢在日期之後返回數據。日期設置爲varcher
我:
SELECT employee_id, emp_firstname, emp_lastname, custom79 AS 'First Pay Date', custom6 AS 'Agency', custom56 AS 'Country of Homebase'
FROM `hs_hr_employee`
WHERE custom6 LIKE 'Brookfield'
AND custom61 LIKE 'active-oam'
AND custom79 > '13-07-2012'
幫助將是偉大的,因爲我不知道如何轉換爲日期查詢
使用UNIX,phpMyAdmin的,SQL
'AND STR_TO_DATE(custom79,'%d-%m-%Y')>'2012-07-13''。 – eggyal