Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2004, 02:41 PM
Authorized User
 
Join Date: Jun 2003
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rylemer Send a message via MSN to rylemer Send a message via Yahoo to rylemer
Default Multiple Not Equal

Hi! Good day
Can anyone correct my SQL Statement

SELECT EmpLastName
FROM Employee
WHERE EmpLastName <>"Espinosa" Or EmpLastName ="Lunar" Or EmpLastName ="Ramos";

I want to have a query ignore all the records with a LastName of "Espinosa, Lunar and Ramos.


Thanks in Advance.

Rylemer
 
Old January 23rd, 2004, 02:44 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default


SELECT EmpLastName
FROM Employee
WHERE EmpLastName <>"Espinosa" Or EmpLastName <>"Lunar" Or EmpLastName <>"Ramos";


Regards,

Beth M
 
Old January 23rd, 2004, 03:09 PM
Authorized User
 
Join Date: Jun 2003
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rylemer Send a message via MSN to rylemer Send a message via Yahoo to rylemer
Default

Hi! Beth Still not working I Used your Query It shows all the record.

Thanks,
Rylemer
 
Old January 23rd, 2004, 03:20 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This should work:

SELECT EmpLastName
FROM Employee
WHERE ((Not (Employee.EmpLastName)="Espinosa" And Not(Employee.EmpLastName)="Lunar" And Not(Employee.EmpLastName)="Ramos"));
 
Old January 23rd, 2004, 03:34 PM
Authorized User
 
Join Date: Jun 2003
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rylemer Send a message via MSN to rylemer Send a message via Yahoo to rylemer
Default

yeah it works thanks Beth I really appreciate your help.

Elmer :)
 
Old January 23rd, 2004, 04:59 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My pleasure. Sorry for the first hasty reply, but I'm glad we got it working.

Beth





Similar Threads
Thread Thread Starter Forum Replies Last Post
INNER JOIN Not EQUAL rylemer Access VBA 3 May 8th, 2017 01:35 AM
What's behind the 'Equal' and 'LinkedList' buttons Everard Hughes BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 1 September 27th, 2008 08:44 AM
~* Total pages are not equal *~ chakravarthy_vr Reporting Services 2 October 13th, 2006 03:56 PM
Set form value equal to databse fs22 Javascript How-To 17 July 16th, 2004 04:39 AM
How to "Set" a function equal to a DataReader DittoToo ASP.NET 1.0 and 1.1 Basics 1 July 1st, 2003 10:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.