Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL syntax problem
Message
From
07/03/2000 18:28:34
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00342976
Message ID:
00343011
Views:
38
Robert,

Looks like some code is missing but, more importantly, what is the error message that you are getting with this?

And is &budget a legitimate field name?

Jim N


>I have ran into some old code that was written in VFP 3.0 that use a UNION command to connect two select statements. Since this does not work in VFP 6.0 does anyone know how I would re-write this code it VFP 6.0 ?
>
>SELECT lkacode.account, description, lkacode.aie_code, ;
> &budget as budget, sum(achecks.amount) ;
> FROM N:\artfox2\data\artfox2!lkacode, achecks ;
> WHERE lkacode.account = achecks.account ;
> AND achecks.entryid between (nLow) and (nHigh) ;
> AND lkacode.aie_code = achecks.itemcode ;
>UNION ;
>SELECT lkacode.account, description, lkacode.aie_code,;
> &budget as budget, 0.0 ;
> FROM N:\artfox2\data\artfox2!lkacode ;
> WHERE lkacode.account+lkacode.aie_code NOT IN ;
> (SELECT achecks.account+achecks.itemcode;
> FROM n:\artfox2data\artfox2!lkacode, achecks ;
> WHERE lkacode.account = achecks.account ;
> AND achecks.entryid between (nLow) and (nHigh) ;
> AND lkacode.aie_code = achecks.itemcode) ;
> INTO table f:\artfox\led_summ ;
> ORDER BY 1, 3 ;
> group by achecks.itemcode ;
Previous
Reply
Map
View

Click here to load this message in the networking platform