cancel
Showing results for 
Search instead for 
Did you mean: 

Query

Former Member
0 Kudos

Hi

I want query if user select Open it should display Open Sales Order , if user enters Closed it should display Closed Sales Order during that period. This i want through 1 query . Fields required are Order No , Date , Customer , Amount , Status.

Thanks

View Entire Topic
Former Member
0 Kudos

Try this query.

SELECT T0.[DocNum], T0.[CardCode], T0.[CardName], T0.[DocDate], T0.[DocTotal], T0.[DocStatus] FROM ORDR T0 WHERE (T0.[DocStatus]  = 'O' and  T0.[DocStatus]  = [%0]) OR ( T0.[DocStatus]  = 'C' and   T0.[DocStatus] = [%0] and  T0.[DocDate]  >= [%1] and  T0.[DocDate]  < [%2])

Krishnan