SELECT c.LocationNum, c.OwnerNum, o.FirstName, o.LastName
FROM CondoUnit c
JOIN Owner o
ON c.OwnerNum=o.OwnerNum;
Expected to see for every condo locationnum, ownernum, firstname, last name. Access says it is a syntax error
SELECT c.LocationNum, c.OwnerNum, o.FirstName, o.LastName
FROM CondoUnit c
JOIN Owner o
ON c.OwnerNum=o.OwnerNum;
Expected to see for every condo locationnum, ownernum, firstname, last name. Access says it is a syntax error
Share Improve this question edited Nov 18, 2024 at 22:37 Bergi 667k161 gold badges1k silver badges1.5k bronze badges asked Nov 18, 2024 at 22:10 Diana GrigoriantsDiana Grigoriants 211 bronze badge 5 |1 Answer
Reset to default 3The Access database engine does not accept JOIN
alone and complains "Syntax Error in FROM clause" when encountering it. You must always specify the type of join you want (INNER
, LEFT
, or RIGHT
).
I think you want INNER JOIN
:
SELECT c.LocationNum, c.OwnerNum, o.FirstName, o.LastName
FROM CondoUnit c
INNER JOIN Owner o
ON c.OwnerNum=o.OwnerNum;
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745591355a4634851.html
AS
for the table aliases...FROM CondoUnit AS c JOIN Owner AS o
- support.microsoft/en-gb/office/… – phuzi Commented Nov 18, 2024 at 22:31MS-Access
also support alias without keywordAs
. Problem is in join type not defined. In access there are only three join type ` (1) Inner Join (2) Left Join (3) Right Join. So, OP must specify join type. – Harun24hr Commented Nov 19, 2024 at 7:49