I kinda lost with this simple query
Below is the query with date (SERVICE_DATE):
SELECT DISTINCT JOB_ID,
SERVICE_DATE,
GRAND_TOTAL,
TYPE_INSERT,
PAYMENT_ID
FROM TBL_XXX
WHERE USER_ID = 100
AND PAYMENT_ID <> 0
ORDER BY JOB_ID DESC;
And I got this result:
467 18/10/2012 16 Upload 527811
467 18/10/2012 16 Upload 527811
466 18/10/2012 4 Key-In 527806
465 18/10/2012 4 Key-In 527804
464 17/10/2012 24 Upload 527784
464 17/10/2012 24 Upload 527784
464 17/10/2012 24 Upload 527784
while this query without date (SERVICE_DATE)
SELECT DISTINCT JOB_ID,
GRAND_TOTAL,
TYPE_INSERT,
PAYMENT_ID
FROM TBL_XXX
WHERE USER_ID = 100
AND PAYMENT_ID <> 0
ORDER BY JOB_ID DESC;
Result:
467 16 Upload 527811
466 4 Key-In 527806
465 4 Key-In 527804
464 24 Upload 527784
what Im missing here ?
Your service_date is a date wich contains a time part, but your IDE present only the date part.
To see the detalis you may change the preferences of your IDE for the format of date or use: