General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only