Re: INSERT INTO error: "...contains the following unknown field name..



Hi -

Did you try creating an append query to see if that works? You could then
paste the resulting SQL into your code.

John


Brad Granath wrote:
I'm having trouble with a multiple INSERT statement:

INSERT INTO [Course Completion] (
[Course Completion].EID,
[Course Completion].Course,
[Course Completion].[Date Completed],
[Course Completion].[Retrain Date]
)
SELECT
[Set Imported EID].EID,
[Set Imported EID].[Course],
[Set Imported EID].[Date Completed],
[Set Imported EID].[Retrain Date]
FROM [Set Imported EID];

When I try to run it, it returns the following error:
"The INSERT INTO statement contains the following unknown field name:
'Course Completion.EID'. Make sure you have typed the name correctly and try
the operation again."

"Set Imported EID" is a query, that runs correctly, and "Course Completion"
is a table that definitely contains the column, "EID." I don't get it. This
is my first time using a multiple INSERT statement, so maybe I'm messing up
the syntax somewhere, but if I am, I don't see how. It does the same thing
if I use a single INSERT, with explicit values. I've checked the spelling
half a dozen times, and had a co-worker go over it as well.

Any help here would be hot.

Thanks,
Brad

--
John Goddard
Ottawa, ON Canada
jrgoddard at cyberus dot ca

Message posted via http://www.accessmonster.com

.



Relevant Pages

  • Re: someone help
    ... "Hugo Kornelis" wrote: ... >>first time I am creating SPs.. ... That's not how SQL works. ... A few well-chosen rows of sample data, ...
    (microsoft.public.sqlserver.clients)
  • Re: Slow execution of a stored procedure
    ... When SQL Server compiles the SP it does not know the value of the local ... variable within SP and it may lead to bad execution plan. ... the first time I execute the SP the ... > no more than 50), using the index, and then do the clustered index seek ...
    (microsoft.public.sqlserver.programming)
  • Re: Crosstab : PIVOT ... IN (...) problem !
    ... That same line has another error in it that I didn't see the first time. ... a typo then may I recommend that you copy the actual SQL ... Is the SQL engine going to treat that 1 as a numeric value ... TRANSFORM Nz,0) AS [SommeDeTotal Annuel] ...
    (microsoft.public.access.queries)
  • Re: 500.100 Error Passing Session Variable to SQL
    ... > The first time I run the page I get this error, if I run the page a ... Response.write sSQL ... It is not a good idea to use dynamic sql. ... give the SQL Injection FAQ at www.sqlsecurity.com a read. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Select - SQL vs. SUM
    ... SQL SELECT doesn't read the buffered data in the Grid, ... > I have a grid whose recordsource is a table named _payments. ... > first time and hit Enter key, the value in txtUnused is updated and the ...
    (microsoft.public.fox.programmer.exchange)