Hi @Garry Chapple ,
Welcome to Microsoft Q&A!
Please try with below:
SELECT *
FROM MyTranTable
WHERE (MyTranNarrative LIKE 'ABC%') AND (MyPersonalTran LIKE '123456_%') AND (MytranFee = 2.50) AND (MyTranDateTime BETWEEN { fn NOW() } -5 AND { fn NOW() }) AND
((MymachineId = 'AB54321A') OR
(MymachineId = 'AB232323A') OR
(MymachineId = 'AB765436A'))
OR:
SELECT *
FROM MyTranTable
WHERE (MyTranNarrative LIKE 'ABC%') AND (MyPersonalTran LIKE '123456_%') AND (MytranFee = 2.50) AND (MyTranDateTime BETWEEN { fn NOW() } -5 AND { fn NOW() }) AND
MymachineId in ( 'AB54321A','AB232323A','AB765436A')
If both of above are not working, we recommend that you post CREATE TABLE statements for your tables together with INSERT statements with sample data, enough to illustrate all angles of the problem. We also need to see the expected result of the sample.
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.