Hello to All

Is there a way to make a query that gives the same
result of doing:

select sum(FieldX) from TableX where FieldY ==
Something;

The way i found goes like this, but I am sure that
there should be a nicer way.

Amount SumAmount;
Query queryX;
QueryRun queryrunX;
TableX tableM;

queryX = new Query(tablenum(TableX));
queryX.dataSourceNo(1).addRange(fieldnum(TableX,
FieldY)).value('Something');
queryRunA = new QueryRun(queryA);
while(queryRunA.next()){
  tableM = queryRunA.getNo(1);
  SumAmount += tableX.FieldX;
}

It's too slow.
Thanks if somebody can help me.

Roberto

_________________________________________________________
Do You Yahoo!?
Informaci�n de Estados Unidos y Am�rica Latina, en Yahoo! Noticias.
Vis�tanos en http://noticias.espanol.yahoo.com




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to