Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining two SQL statements
Message
De
05/06/2002 16:57:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Combining two SQL statements
Divers
Thread ID:
00665149
Message ID:
00665149
Vues:
61
Hi:

Is there a way to combine the following into one SQL statement? I tried, but it didn't seem to work.

thanks,

Yossi
select arcash99->invno, ;
	sum(arcash99->paidamt) as cashpaid ;
	from arcash99 ;
	where empty(arcash99.artype) ;
	GROUP BY arcash99.invno ;
UNION ;
	select arycsh99->invno, ;
	sum(arycsh99->paidamt) as cashpaid ;
	from arycsh99 ;
	where empty(arycsh99.artype) ;
	GROUP BY arycsh99.invno ;
	INTO CURSOR CURS1

select CURS1->invno, ;
	sum(CURS1->cashpaid) as cashpaid ;
	from CURS1 ;
	GROUP BY CURS1.invno ;
	INTO CURSOR CURS2
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform