Queries:
SELECT DISTINCT RCPCODE
FROM SMC..ICWGHC.C_JOBINFOHISTORY
WHERE UPDATE_DATETIME >= '2017-01-14 13:08:49.0000000'
AND UPDATE_DATETIME <= '2017-01-16 13:08:49.0000000'
SELECT DISTINCT RCPCODE
FROM SMC..ICWGHC.C_JOBINFOHISTORY
WHERE COMPLETE_DATETIME BETWEEN '2017-01-16 06:52:38.0000000'
AND '2017-01-16 12:52:38.0000000'
ORDER BY COMPLETE_DATETIME DESC
Both the queries with BETWEEN and ">=" did not work for condition in Date column.
If I use this query:
SELECT DISTINCT RCPCODE
FROM SMC..ICWGHC.C_JOBINFOHISTORY
it does return data.
I'd like to filter data with BETWEEN condition for retrieving data, so that I can sort with datetime.
