I have a table like below:
MyTable
FileNo: | amount | date
---------------------------------------------------
111 | 55 | 2017-04-07 04:51:45.870
111 | 55 | 2017-04-08 04:51:45.870
111 | 55 | 2017-04-09 04:51:45.870
111 | 55 | 2017-04-10 04:51:45.870
999 | 55 | 2017-04-11 04:51:45.870
111 | 55 | 2017-04-12 04:51:45.870
999 | 55 | 2017-04-13 04:51:45.870
111 | 55 | 2017-04-14 04:51:45.870
999 | 55 | 2017-04-15 04:51:45.870
Now I want to fetch records where FileNo: is '111' and date between '04/07/2017' and '04/10/2017'
I have written my query like below:-
select * from MyTable where FileNo: = 111 and date >= '04/07/2017' and date <= '04/10/2017'
But it didn't work, there was no error found, It didn't return any records, it just showed empty table!, is my syntax wrong or am I missing 'Group By' or any other Clause?