guilmor
17th September 2002, 16:33
Hi guys!

How can I implement something similar to "distinct row" in Baan SQL?

Guilmor

nick_rogers
17th September 2002, 16:56
The clause does not exist in Baan sql - you to can use the as with 1rows syntax to force only one row to be returned that match the criteria. Or you will have to place some extra checks within the select do to get the record you want.

select tdsls040.orno
from tdsls040
where tdsls040.odat = todays date
order by tdsls040._index1
as set with 1rows
selectdo
only the first record encounted will be returned
endselect

dbinderbr
17th September 2002, 20:50
Nick is right, unfortunatelly the clause distinct do not exist in Baan Tools. So, you have to do the data selection by yourself within the selectdo.

hklett
18th September 2002, 09:00
Maybee you can simulate a distinct row if you use a group by
clause for all fields you use in the select.



select t.a,t.b,t.c,.t.d
from t
group by t.a,t.b,t.c,t.d



Holger