Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use standard SQL statement
Message
 
To
07/12/2006 13:19:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01175780
Message ID:
01175788
Views:
10
>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 ?

Try :
DELETE FROM t1 ;
  WHERE left(rida,2) NOT IN ;
   (SELECT left(rida,2) FROM  t2 where month in (sele MAX(month) FROM t2))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform