>Hi everybody,
>Is there a way to quickly summarize the values of a table into a cursor based on something, in this case the partno.
>
>The structure of table is Date D, Commodity C(30), Suppid C(10), Partno C(17), def_0199 I, def_0299 I, def_0399 I, def_0499 I, etc.
>
>Lets say that I want a summarization of four (4) partno's, I want to return the identical structure expect that it would contain only the summarized data for the four partno's.
>
>Thanks,
>Joseph Schaff
Check the GROUP BY clause of the SELECT - SQL command. This one will combine several records in one. Use
sum(MyField) as TotalMyField to sum individual fields within each group.
HTH, Hilmar.
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)