Missing Operator

G

Guest

I am working with Access 03. I have a db where I have a query that I probably
have been looking at it for too long and am missing something simple. What I
am trying to do is have the query ask for what type of award, then ask for a
start date and end date.

The SQL is as follows:

SELECT Fin_Asst.* INTO award
FROM Fin_Asst
WHERE [type of award]=[Enter Award Type], WHERE(((date.Date)>=[Enter Start
Date 01/01/06] And (date.Date)<=[Enter End Date 01/30/06]));

Thx in advance.
 
G

Guest

You have the SELECT and INSERT the wrong way around; you also have two WHERE
clauses; and you seem to have a Date column qualified with a table name Date
although no such table is in the FROM clause. Finally you have two literal
dates in the parameter prompts, which is OK but seems a little unusual.
Assuming Date is a column in the Fin_Asst table and you want to insert the
values from all columns in that table into corresponding column in the table
Award, try something like this:

INSERT INTO Award
SELECT Fin_Asst.*
FROM Fin_Asst
WHERE [type of award]=[Enter Award Type]
AND [Date] >= [Enter Start Date]
AND [Date] <=[Enter End Date];

However, are you sure you need to append rows to another table rather than
just return them from the Fin_Asst table in a query when required? If the
latter just remove the first line from the above.

BTW I'd advise against using Date as a column name. It could be confused
with the built in Date function.

Ken Sheridan
Stafford, England
 

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