smusba
26th February 2023, 10:47
In the below script the select statement should match only if the condition satisfy with 2 rows else the script should be ignored. Please support me to write the script.
function check.for.zero.price()
{
select al1401.orno,al1401.item,al1401.ttyp.c,min(al1401.pric):min.pric
from tdsls401 al1401
where al1401._index1 ={:g.orno}
and al1401.item =:g.item
and al1401.ttyp.c = :g.ttyp.c
group by al1401.orno,al1401.item,al1401.ttyp.c
as set with 2 rows
selectdo
endselect
if min.pric <> 0 then
c.flag = 9
|remarks = "Price"
endif
}
function check.for.zero.price()
{
select al1401.orno,al1401.item,al1401.ttyp.c,min(al1401.pric):min.pric
from tdsls401 al1401
where al1401._index1 ={:g.orno}
and al1401.item =:g.item
and al1401.ttyp.c = :g.ttyp.c
group by al1401.orno,al1401.item,al1401.ttyp.c
as set with 2 rows
selectdo
endselect
if min.pric <> 0 then
c.flag = 9
|remarks = "Price"
endif
}