[thelist] SQL: Help with a simple join

Casey Crookston casey at thecrookstons.com
Wed Jun 18 13:34:18 CDT 2003


Two tables in question: tb_employees and tb_titles.

tb_employees:

+-----------------+-------------+-----------+
|     first_name       |    last_name  |   title_id     |
+-----------------+-------------+-----------+

tb_titles:

+------------+-------+
|     title_id     |    title   |
+------------+-------+

I now need to dispaly the first names, last names, and titles.  Help me out
a little with the SQL syntax:

SELECT first_name.a, last_name.a, title.b, FROM tb_employees.a, tb_titles.b
WHERE title_id.a = title_id.b ORDER BY last_name

Here's the error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a
reserved word or an argument name that is misspelled or missing, or the
punctuation is incorrect.
/boser/about/ind.asp, line 9

Thanks!!!

Casey



More information about the thelist mailing list