Consulta de Microsoft Access Crear tabla SQL

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

Gracias chicos!

preguntado el 31 de julio de 12 a las 12:07

2 Respuestas

SELECT * INTO [Enrolled Students]
    FROM [Candidate Details]
    Where [Student ID] not in( 'rejected', 'pending' ,'taster');

Respondido 31 Jul 12, 12:07

Thanks! that did it! Another Question I assumed doing this would automatically populate my table every time i entered someone into the original table but it wants me to rerun the Query everytime is there a way of doing this automatically? - Sawyer05

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" <...>

Respondido 31 Jul 12, 12:07

user1534524 It is not a good idea to constantly run a make table query. For one, it will lead to database bloat. Why do you feel you need to do this? - fionnuala

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.