sql how to conditional where code example
Example: sql server conditional where clause
select * from transactionDetails
WHERE OrderID in (400376, 400379)
AND
((TransactionDate <> ProcessingDate AND TransactionId in (2,3,9,14,15)
OR
(TransactionDate = ProcessingDate AND TransactionId in (2,3,9)))