Paul Pingel
asked on
Where conditions ignoring parenthesis during execution.
SQL 2016 Where statement seems to be ignoring parenthesis, I am trying to capture work transactions for for a day that has three shifts. The day starts on 02/14 at 6:00 am and ends at the end of third shift on 2/15 at 6:00 am. The database does not use datetime but rather has it broken into two separate fields. When I execute it I get no results. If I take out the time portion of the selection, I get all of the transactions for both days. Any suggestions? Here is the statement:
where ((date_work_trx >= '2018-02-14' and time_work_trx > 060000) and (date_work_trx <= '2018-02-15' and time_work_trx <= 060000))
where ((date_work_trx >= '2018-02-14' and time_work_trx > 060000) and (date_work_trx <= '2018-02-15' and time_work_trx <= 060000))
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER