Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transposing data elements
Message
From
14/02/2009 14:58:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01381685
Message ID:
01381808
Views:
39
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform