Break By Vs. By

nate100

Member
What is the difference between the following codes:

For each t_table no-lock by t_name:
display t_name.
end.

VS

For each t_table no-lock break by t_name:
display t_name.
end.

Both give the same results.
Thanks
 

tamhas

ProgressTalk.com Sponsor
They order the results in the same way, but if you try to use first-of() or last-of() in the loop, then you need to include the break.
 

Jupiter

Member
Or in other words, if you just want to sort "BY" is sufficient. But for doing some kind of aggregates "BREAK BY" can be used.
 
Top