OE 11.3.0, sports2000 database (original).
Very strange. I want to sort on repname and get differences when I change only the batchsize. With 6 sorting is ok, with 7 not. See below for code and results. Is this a known bug solved in a later version?
DEFINE DATA-SOURCE srcSalesrep FOR Salesrep.
DEFINE TEMP-TABLE eSalesrep NO-UNDO BEFORE-TABLE beSalesrep
FIELD SalesRep AS CHARACTER
FIELD RepName AS CHARACTER
FIELD Region AS CHARACTER
FIELD MonthQuota AS INTEGER
INDEX SalesRep IS UNIQUE PRIMARY SalesRep.
DEFINE DATASET dsSalesrep
FOR eSalesrep.
BUFFER eSalesrep:ATTACH-DATA-SOURCE(DATA-SOURCE srcSalesrep:HANDLE).
DATA-SOURCE srcSalesrep:FILL-WHERE-STRING = "WHERE TRUE BY repname".
BUFFER eSalesrep:BATCH-SIZE = 6.
DATASET dsSalesrep:FILL().
FOR EACH eSalesrep:
DISP eSalesrep.
END.
BUFFER eSalesrep:DETACH-DATA-SOURCE().
Below with BUFFER eSalesrep:BATCH-SIZE = 7.
With no batch-size stting sorting does not work either.
--
Kind regards,
Stefan Houtzager
Houtzager ICT consultancy & development
Hello Stefan,
I took a quick look.
The output that you are getting is using the primary index (SalesRep) for eSalesrep after the FILL() returns BATCH-SIZE on the data sorted by repname.
Is this the difference that you are referring to?
I hope this helps.
Thanks Edsel, I know that, but of course that does not help. :-)
Hi there,
IMO this is not a bug. This is how batching works with the FILL() method.
The order you displayed is because of the index on the temp-table:
INDEX SalesRep IS UNIQUE PRIMARY SalesRep.
I think the main question is what do you want do accomplish ?
Regards,
Gabriel
Ah, of course, now I see. Dummy me. Thanks.
--
Kind regards,
Stefan Houtzager
Houtzager ICT consultancy & development
www.linkedin.com/in/stefanhoutzager
- See more at: community.progress.com/.../16443.aspx