I really new to writing SQL statements and I'm not sure where to start with writing the proper syntax using the filter tool inside the In Database Tool.
I want to write a filter that will look between two times of the same day. Example: 2018-08-09 17:00:00 to 2018-08-09 20:59:59.
Any suggestions will be of great help.
Solved! Go to Solution.
in Oracle it looks like:
select * from tab1 where timestamps between to_date('Startdate1',dateformat) and to_date( 'Enddate2',dateformat)
It can also be like
select * from tab1 where timestamps >=to_date('Startdate1',dateformat) and timestamps <= to_date( 'Enddate2',dateformat)
You can google it for correct syntax.
The people above seemed to have answered for Oracle, so I'll just chip in for Microsoft SQLServer:
SELECT *
FROM YOUR_TABLE
WHERE [DATE] BETWEEN '2010-01-01' and '2999-12-31'
above, you'd replace '2010-01-01' and '2999-12-31' with your start and end dates respectively
Thank you for the suggestion ,it has solved by problem.