Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Queries

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-21-2009, 12:56 PM
Novice
 
Join Date: Jan 2009
Posts: 1
corni is on a distinguished road
Default Select query with two criteria

Consider the table:

Name Date Amount
John 1/1/2009 120
Chris 1/7/2009 45
Mary 1/2/2009 35
John 1/18/2009 100
Chris 1/1/2009 20

I need to select all records except those where name is John or Chris And date is 1/1/2009. So my query should retrieve only records 2,3 and 4. What SQL should I use?
Reply With Quote
  #2  
Old 01-22-2009, 02:23 AM
Advanced Beginner
 
Join Date: Jul 2008
Location: Alexandria, Egypt.
Posts: 38
Ahmed Elalfy is on a distinguished road
Send a message via Yahoo to Ahmed Elalfy
Default

Dear corni,

Try this query:

SELECT Table1.Name, Table1.Date, Table1.Amount, [name] & [date] AS exp1
FROM Table1
WHERE ((([name] & [date]) Not Like "John1/1/2009" And ([name] & [date]) Not Like "chris1/1/2009"));

Thanks
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
very difficult (for me!) SELECT query igorbaldacci Queries 1 12-02-2008 12:30 PM
Query Criteria jena Access 1 08-03-2008 02:08 AM
Query Criteria jena Queries 1 04-29-2008 09:00 AM
Using SELECT query within a VBA code in Access championss Programming 4 10-23-2006 03:50 PM
Query Criteria Texaine Queries 0 04-06-2006 06:28 AM


All times are GMT -8. The time now is 02:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.