jmathew
20th April 2005, 16:33
Hi,
I am trying to select unique sales order numbers from the table tdsls045 and in some cases the system is not doing so. I am not sure about the mistake in my code which is given below;
select tdsls045.orno :orno1
from tdsls045, tiitm001, tccom010
where tdsls045._index1 inrange {:orno.f} and {:orno.t}
and (tdsls045.orno between :orno.f and :orno.t
and tdsls045.orno not between 800000 and 899999)
and tdsls045.item between :item.f and :item.t
and tdsls045.cuno between :cuno.f and :cuno.t
and tdsls045.ddat between :ddat.f and :ddat.t
and tdsls045.item refers to tiitm001
and tdsls045.cuno refers to tccom010
and tiitm001.kitm = tckitm.manufacture
and tccom010.ccty = "BAH"
group by tdsls045.orno
selectdo
further process......
endselect
Please let me know how can i get unique sales order number in the above code to further process after the selecdo option.
I am trying to select unique sales order numbers from the table tdsls045 and in some cases the system is not doing so. I am not sure about the mistake in my code which is given below;
select tdsls045.orno :orno1
from tdsls045, tiitm001, tccom010
where tdsls045._index1 inrange {:orno.f} and {:orno.t}
and (tdsls045.orno between :orno.f and :orno.t
and tdsls045.orno not between 800000 and 899999)
and tdsls045.item between :item.f and :item.t
and tdsls045.cuno between :cuno.f and :cuno.t
and tdsls045.ddat between :ddat.f and :ddat.t
and tdsls045.item refers to tiitm001
and tdsls045.cuno refers to tccom010
and tiitm001.kitm = tckitm.manufacture
and tccom010.ccty = "BAH"
group by tdsls045.orno
selectdo
further process......
endselect
Please let me know how can i get unique sales order number in the above code to further process after the selecdo option.