Reputation: 1604
Can someone tell me whats wrong with my where clause in this statement in a Access SQL
SELECT * INTO [Enrolled Students]
FROM [Candidate Details];
Where Student ID != 'rejected' OR 'pending' OR 'taster';
Or if possible, could it be corrected to where IsNumeric(Student ID)?
I cant seem to figure it out
Thanks Guys!
Upvotes: 1
Views: 2542
Reputation: 24046
SELECT * INTO [Enrolled Students]
FROM [Candidate Details]
Where [Student ID] not in( 'rejected', 'pending' ,'taster');
Upvotes: 2
Reputation: 91356
In MS Access
SELECT * INTO [Enrolled Students]
FROM [Candidate Details]
Where [Student ID] Not IN ("rejected","pending","taster");
It seems that Student ID is a text field if it can contain "rejected". Not In is more convenient in this case, otherwise you would have to say:
Where [Student ID] <> "rejected" And [Student ID] <> "pending" <...>
Upvotes: 1