Using 9.1d.
I need to go through some records and accumulate a value into a weekly bucket based on a record date field. I thought about something like this but the compiler complains about the function I have in the last-of function.
WeekNumber is a function that returns the number of the week within year.
Here is the error message...
Any tips on how to make this work?
I need to go through some records and accumulate a value into a weekly bucket based on a record date field. I thought about something like this but the compiler complains about the function I have in the last-of function.
WeekNumber is a function that returns the number of the week within year.
Code:
for each mytable break by WeekNumber(mytable.mydate) no-lock:
if last-of(WeekNumber(mytable.mydate)) then do:
do stuff
end.
end.
Code:
** BREAK keyword or BY phrase missing for aggregate expression. (574)