sql query won't work

G

Golfinray

I have two tables, Districts (as in school districts) and in the district
table are the names of all the school districts in the state in order. The
second table is Districts With Projects (I called it DWP) and in it are the
district names and the projects those districts have completed. So there is
one column in the first table and two columns in the second table. The are
256 records in the first (districts) table and 183 records in the second
table. All I want to do is have a query that reports all 256 district names
and beside the district names either the project or a blank (if there was no
project for that district.) The query is:
Select districts.district, dwp.district
From districts left join as dwp
On districts.district = dwp.district

It keeps giving me syntax errors in the FROM statement.
Please help! Thanks so much!!!
 
J

John Spencer

You have an extraneous "AS" in your SQL string

SELECTdistricts.district, dwp.district
FROM districts LEFT JOIN dwp
ON districts.district = dwp.district

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Golfinray

It still won't work. It gives me a syntax error in the FROM statement. I have
checked all spelling, table name, etc. I made sure that there was not another
join on either of those tables. I don't know what else to do. Help! Thanks so
much!!
 
J

John Spencer

Please copy and paste the SQL of the query that is failing. Don't just type
it into the message.

I don't see why the query won't work. If you were getting a different error
message such as
.... cannot find the input table or ... then I would suspect a typo in the
table name(s).

If you copied the SQL directly from the posting, you might try typing it
instead. Sometimes a newsreader will introduce a non-visible character into
the text that will cause a problem.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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

Similar Threads


Top