I HAVE A TABLE NAMED WHSSHIPMENTTABLE WHICH CONSISTS OF FIELD CALLED MODIFIED DATE AND TIME
I NEED TO WRITE A QUERY TO FILTER DATA ON PATICULAR DATE N TIME
THIS IS WHAT I WROTE:
SELECT *FROM DBO.WHSSHIPMENTTABLE WHERE CARRIERSERVICECODE='T' AND MODIFIEDDATETIME= 2021-01-05 14:51:48.000 ORDER BY MODIFIEDDATEANDTIME ASC;
it says syntax error near 14:51:48
Use quoation marks around the value.
SELECT *FROM DBO.WHSSHIPMENTTABLE WHERE CARRIERSERVICECODE='T' AND 'MODIFIEDDATETIME= 2021-01-05 14:51:48.000' ORDER BY MODIFIEDDATEANDTIME ASC;
By the way, use Insert > Code (in ther rich formatting view) to paste source code to this forum, as I did.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156