>I am re-writing a legacy accounting app. The desire at hand is to take a group of ledger entires (rows in the temporary batch posting table) and save them in a subsidiary table (P/R check journal). The field names in the P/R check journal have more "readable" names and may require 15-20 rows of data from the posting table to record all the various withholding values.
>
>Perhaps more clearly I want to take 10-20 rows of the posting table and insert them into 1 row of the subsiary P/R check table.
>
>I hope this helps,
>
>Gary De Lecce
That sounds like a typical situation for a "GROUP BY", although looking at the data, I still don't understand the desired pattern.
A command like:
select KeyField, sum(Amount) as TotalAmount;
from MyTable;
into cursor Tmp
can group several records into one, calculate totals, maximum values, etc.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)