Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem writing 2 queries from the same table
Message
From
23/10/2002 20:30:17
 
 
To
23/10/2002 19:47:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00714587
Message ID:
00714611
Views:
19
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
Previous
Reply
Map
View

Click here to load this message in the networking platform