Thanks a lot Hilmar for your answer. Exactly what I wanted. Which brings me to another question ......
I have a report which looks like this ...
Dataclerk
Richard
Table Number of records
table1 50
table2 7
Dataclerk
Hilmar
Table Number of records
table1 60
table2 20
I want my report to look like:
Dataclerk
Richard
Table Number of records Total
table1 50
table2 7 57
Dataclerk
Hilmar
Table Number of records Total
table1 60
table2 20 80
How do I go about this? The table used for the report is created by code and it's not included in the Dataenviroment explicitly.
Richard.
>
>>SELECT table1.DATA_CLERK, "1" as Origin;
>> FROM table1;
>> HAVING table1.date1 <= m.date1;
>> AND table1.date2 >= m.date2;
>>UNION ALL;
>>SELECT table2.data_clerk, "2" as Origin;
>> FROM table2;
>> HAVING table2.date1 <= m.date1;
>> AND table2.date2 >= m.date2;
>> into cursor Temp;