Skip to Content
0
Former Member
Jan 29, 2009 at 09:19 AM

Query with multiple filter

67 Views

Hi All,

I need to write a query example

SELECT 'INV', T0.DocDate, T0.CardCode, T0.CardName, T0.DocTotal FROM OINV T0

WHERE T0.DocDate BETWEEN '[%0]' AND '[%1]'

UNION

SELECT 'CN', T1.DocDate, T1.CardCode, T1.CardName, T1.DocTotal FROM ORIN T1

WHERE T1.DocDate BETWEEN '[%2]' AND '[%3]'

But Actually i want to filter the Date is same. How can the query can help only filter one time only mean between date1 and date2, and my query can filter all the invoice and CN between date1 and date2

Please advised.

Thanks