English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Such as an aggregate product function...

2006-09-17 19:14:10 · 2 answers · asked by John T 3 in Computers & Internet Programming & Design

For example,

an aggregate function in SQL would be SUM(colname) which would do an aggregate sum of all of the rows in the column. I want to be able to do my own that will aggregate with product using foxpro.

2006-09-17 20:51:18 · update #1

2 answers

if u have a dbf with the following records

name basic da hra gross pf net
mandakini 5000 2000 1000 8000 800 7200
raveena 7000 3000 2000 12000 1200 10800
kiran 6000 1000 500 7500 750 6750

then sum basic to x
? x
resut - 18000

sum da to y
? y
resut - 6000

sum hra to z
? z
result - 3500

sum gross to a
? a
result - 27500

sum pf to b
? b
result - 2750

sum net to c
? c
result - 24750


u can also pass field as a parameter to function(user defined) and use that function.

2006-09-19 20:14:15 · answer #1 · answered by lakshmi r 4 · 0 0

Create a module. Inside a mudule create the function. You can call the finction with required parameters from anywhere.

2006-09-17 19:17:21 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers