[progress Communities] [progress Openedge Abl] Forum Post: Re: Performance Problem On A...

  • Thread starter Thread starter Tim Kuehn
  • Start date Start date
Status
Not open for further replies.
T

Tim Kuehn

Guest
Another approach - get all the unique "startnum" in another TT and then do a join between that TT and the original TT like so: /* tt1Start has all the unique "Startnum" values */ /* tt1End has all the values in the original tt1 */ DEFINE TEMP-TABLE tt1Start NO-UNDO FIELD StartNum AS INTEGER INDEX ixSt IS UNIQUE StartNum. DEFINE TEMP-TABLE tt1End NO-UNDO FIELD StartNum AS INTEGER FIELD EndNum AS INTEGER INDEX ixSt StartNum EndNum. DEFINE TEMP-TABLE tt2 NO-UNDO FIELD foo AS INTEGER INDEX ixFoo. FOR EACH tt2 NO-LOCK: FOR EACH tt1Start WHERE tt1Start.StartNum = tt2.foo NO-LOCK: /* do stuff */ LEAVE. END. END. One could also accomplish a similar result using just the original TT and some variables if there was a need for it.

Continue reading...
 
Status
Not open for further replies.
Back
Top