sql help

akohl's picture

They have: 117 posts

Joined: Feb 2001

I'm using access 97. I've been relying on it's querey design function to compose most of my queries till now.

Here's one that I just don't know how to write.

first name and last name from the user's table where the user_id number (the auto number primary key of the users table) is not found in the accounts table.

I just need the sql string to use in a record set open command.

Thanks much.

Andy Kohlenberg
Jerusalem, Israel

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Andy,

Try this:

SELECT UserTable.UserID,FirstName,LastName,AccountTable.UserID
FROM UserTable,AccountTable
WHERE UserTable.UserID <> AccountTable.UserID

Just replace table & field names with the real ones.

PJ | Are we there yet?
pjboettcher.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.