grajenda
2nd June 2005, 19:39
Hai all
I want to find out the no of distinct sales orders from sales order history table tdsls450.I I could not find a better way then the below.Pls let me know is there any better way to get the no of records??

tdsls450 primary key is Ordernum & transaction date

select tdsls450.orno
from tdsls450
group by tdsls450.orno
selectdo
count.total = count.total + 1
endselect

regards
Rajendar

Rita Kotecha
3rd June 2005, 07:22
select count(distinct orno) as count.total from tdsls450


Regards
Rita

grajenda
3rd June 2005, 20:05
Can I use the distinct keyword in Baan???

beginer
7th June 2005, 09:18
Hi ,

U cannot use distinct word in BaaN ... there is no such keyword.
The solution proposed is for SQL.
As far as BaaN is concerned the query u hv mentioned is the way u can achive the required result.

bdittmar
7th June 2005, 13:59
select count(tdsls450.orno):ornocounter
from tdsls450
group by tdsls450.orno
selectdo
display("ornocounter")
refresh()
endselect

regards
Rajendar[/QUOTE]