newbie SQL SELECT help

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I've been looking thru the posts but I havent been able to find an
example for what I need:
given that I have two tables:
NAMES with columns NAME LAST_NAME AGE
and
ADDRESS with columns NAME ADDRESS PHONE

I need the list of names that exist in table NAMES columns NAME but
not in table ADDRESS column NAME
this is what I have but obvoislly it doesn't work:

SELECT a.NAME, a.LAST_NAME, a.AGE -
FROM NAMES a, ADDRESS b -
WHERE a.NAME not in b.NAME -
ORDER BY a.NAME
 
Use the Query wizard to create an UnMatched record query, to list all the
records that exist in Table NAMES but not in table ADDRESS

Something like

Select NAMES.* From Names Left Join ADDRESS On NAMES.Name = ADDRESS.Name
Where ADDRESS.Name Is Null
 
is there anyother way of doing it (without a join)? I dont think my
database supports this sql feature
-->Unexpected SQL identifier token - 'JOIN'. ... thanks
 
is there anyother way of doing it (without a join)? I dont think my
database supports this sql feature
-->Unexpected SQL identifier token - 'JOIN'. ... thanks

What is your database!? It's certainly not Access - or else you have a
typo in the query. Please post the entire SQL string that you're
trying to execute.

A relational database with Joins is like an automobile without an
engine...

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top