Kurt,
GROUP BY wouldn't works that way :-)
That was my first thought :-)
>Andrus,
>
>You cannot compare multiple columns that way. Instead concatenate the rida and month columns together and compare them in your WHERE statement such as:
>
>DELETE FROM t1 ;
> WHERE ( left(rida,2) + month ) NOT IN ;
> (SELECT left(rida,2) + MAX(month) FROM t2 ;
> group by 1)
>
>
>Kurt
>>I have tables
>>
>>
CREATE CURSOR t1 ( rida c(10), month c(6) )
>>CREATE CURSOR t2 ( rida c(10), month c(6) )
>>
>>I need to delete from table t1 so that only last month rows remain.
>>
>>I tried
>>
>>
DELETE FROM t1 ;
>> WHERE ( left(rida,2),month ) NOT IN ;
>> (SELECT left(rida,2), MAX(month) FROM t2 ;
>> group by 1)
>>
>>
>>but got error
>>
>>Function name is missing )
>>
>>
>>How to run this statement in VFP ?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.