Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL to not include certain records
Message
From
11/07/2003 11:15:48
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL to not include certain records
Miscellaneous
Thread ID:
00809217
Message ID:
00809217
Views:
72
I'm trying to exclude any records with the EMPID = 7260 AND PLANID = 2571. If the EMPID = 7260 and the PLANID = 1234, then I do want the record. The SQL below is removing all records with a PLANID of 2571. I'm trying to do this quickly for a production issue. What should the syntax be?

Renoir
	SELECT Pmempdet.Planid, Pmempdet.Policy, Firstname, Midname, Lastname, SSN, ;
		Employed, Pmempdet.Leligible, Pmempdet.Particip, Email, pmemp.empid,  ;
		PmEmpDet.VestER, PmEmpDet.VestPs ; 
		FROM pmemp, Pmempdet ;
		WHERE (PMEMPDET.EMPID <> 7260 AND PMEMPDET.PLANID <> 2571) ;
		AND Pmempdet.Planid = tmpPlans.Planid ;
		AND Pmempdet.empid == pmemp.empid ;
		AND !Pmemp.NoDisplay ;
		INTO CURSOR Tmp_hold1
Next
Reply
Map
View

Click here to load this message in the networking platform