Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WHERE Not IN
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01512443
Message ID:
01512484
Views:
53
>This is what I have and it isn't quite working; FoxPro doesn't like the subquery.
>
>
>	SELECT ;
>		 " " AS CheckOff, a.grpid, a.grpnum, b.lastname, b.firstname, b.dob, a.Hist, a.PlanKey, a.Status, a. Renewal, ;
>		a.ptd ;
>	FROM grpextcv  a ;
>	JOIN grpextin b ON a.grpid+a.grpnum=b.grpid+b.grpnum ;
>	WHERE a.Hist="99" AND a.GrpID="ACS" AND ;
>		(YEAR(a.ptd) > 1997 AND YEAR(a.ptd) < 2009) AND (INLIST(a.Status, "C, U, T") OR ;
>		INLIST(a.Renewal, "X, C, L, D")) AND a.GrpID =;
>		(SELECT grpID FROM grpextin d WHERE INLIST(Status, "A", "B") AND Hist="99" AND ;
>		d.GrpNum <> a.GrpNum) ;
>		ORDER BY a.grpid, a.grpnum ;
>	INTO CURSOR tmpBefore2009_ACS_Only
>
>
Maybe I'm reading it wrong but do you want
(INLIST(a.Status, "C", "U", "T") OR INLIST(a.Renewal, "X", "C", "L", "D"))
which could also be written as
(a.status IN ("C", "U", "T") OR a.Renewal IN("X", "C", "L", "D"))
Previous
Reply
Map
View

Click here to load this message in the networking platform