low_date not working with field value ?

subhendra

New Member
Hi everyone,

I had written a query which accepts paid date as selection criteria. If paid date range is blanked then i assign to low_date and hi_date as per QAD standard. But this doesn't return record where AR paid date field having ? value. How can the query be written for such cases. below is the query example ...

*************
{mfdeclre.i}

define variable ardt like ar_date.
define variable ardt1 like ar_date1.
define variable dt like ar_paid_date.
define variable dt1 like ar_paid_date.


update ardt
ardt1
dt
dt1
with frame a.

if ardt = ? then ardt = low_date.
if ardt1 = ? then ardt1 = hi_date.
if dt = ? then dt = low_date.
if dt1 = ? then dt1 = hi_date.
for each ar_mstr where ar_date >= ardt and ar_date <= ardt1
and ar_paid_date >= dt and ar_paid_date <= dt1
no-lock:
disp ar_mstr with 2 col.
end.
***************

Thanks for reply.
Subhendra.

 

zee

New Member
Add condition where ar_paid_date = ?

and (ar_paid_date = ? or (ar_paid_date >= dt and ar_paid_date <= dt1))
 

subhendra

New Member
Thanks buddies.

I have changed my query with the following condition and it's working.

-------
and ((ar_paid_date >= pdate)
and (ar_paid_date <= pdate1)
or (pdate = low_date and ar_paid_date = ?))
--------

Thanks all the reply and help.
 
Top