Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL to not include certain records
Message
 
 
To
11/07/2003 11:15:48
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00809217
Message ID:
00809225
Views:
27
This message has been marked as a message which has helped to the initial question of the thread.
Renoir,

Change it to
  WHERE NOT (PMEMPDET.EMPID = 7260 AND PMEMPDET.PLANID = 2571) ;
>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
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform