Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem writing 2 queries from the same table
Message
De
23/10/2002 20:30:17
 
 
À
23/10/2002 19:47:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00714587
Message ID:
00714611
Vues:
21
SELECT a.prempl , a.taxid , a.ytax+b.qtax as ytax ,a.ybase+b.qbase as ybase,;
a.ywage+b.qwage as ywage;
FROM a_prehtx a, a_prehtx b;
WHERE a.txqtr = '3' AND b.txqtr = '4' AND b.Ytax<>a.Ytax+b.Qtax AND ;
(a.qtax <> 0 AND a.qbase <> 0 AND a.qwage <> 0) AND (b.qtax <> 0 AND b.qbase <> 0 AND b.qwage <> 0) AND;
a.prempl = b.prempl AND a.taxid = b.taxid into cursor new_a_prehtx

select new_a_prehtx
scan all
update a_prehtx Set Ytax = new_a_prehtx.ytax,;
YBase = new_a_prehtx.Base,;
Ywage = new_a_prehtx.ywage;
where prempl=new_a_prehtx.prempl and taxid = new_a_prehtx.taxid

endscan

USE IN a_prehtx
USE IN new_a_prehtx
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform