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

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
0
Utf
2/15/2008 5:50:01 PM
access.queries 6343 articles. 1 followers. Follow

4 Replies
4146 Views

Similar Articles

[PageSpeed] 45

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

0
J_Goddard
2/15/2008 6:24:16 PM
On Fri, 15 Feb 2008 09:50:01 -0800, Brad Granath
<BradGranath@discussions.microsoft.com> 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."

Try just leaving off the tablename in the insertion fields:

INSERT INTO [Course Completion] (EID,Course,[Date Completed],[Retrain Date])
SELECT ...

The table name certainly isn't *needed* - you can only insert into fields in
the target table anyway.
-- 
             John W. Vinson [MVP]
0
John
2/15/2008 6:43:29 PM
Thanks.

I guess it didn't like the fact that I was specifying the columns like:

INSERT INTO tablename (tablename.columnname, tab...

Instead it wanted:

INSERT INTO tablename (columnname, col...
0
Utf
2/15/2008 6:49:01 PM
Yep, that did it.  Thanks for the help, guys.
0
Utf
2/15/2008 7:13:01 PM
Reply:

Similar Artilces:

Change name in From section
How do I change how my name is displayed in the From section of my mailbox? Go to Tools, Accounts, select that account, click Properties.=20 On the General tab you can change the displayed name. --=20 Gary VanderMolen, Microsoft MVP (Mail) http://mvp.support.microsoft.com/default.aspx/profile/vandermolen "kabutton" <kabutton@discussions.microsoft.com> wrote in message = news:72ADFCC4-487B-45D8-AA62-E597CFFF44E8@microsoft.com... > How do I change how my name is displayed in the From section of my = mailbox? ...

How do I insert Roman Numerals?
New to Word 2007 would someone please explain to me how to insert Roman Numerlas in my document? "ckj" <ckj@discussions.microsoft.com> wrote in message news:6CF0C580-BA6E-463D-B4FD-E6A6FDD9E814@microsoft.com... > New to Word 2007 would someone please explain to me how to insert Roman > Numerlas in my document? Just type them... I II III IV V VI VII VIII IX X XI etc etc. Type a number e.g. 21, select it and run the following macro Dim oRng As Range Set oRng = Selection.Range oRng.Fields.Add oRng, 34, oRng.Text & " \*Roman"...

Showing a date field as a number
Hi. I was wondering if there was any way that I could have a column showing the date and time (20/12/2007 06:00:00) and another column show the date and time as a number, (29548). This would be done in a select query, but I am not sure how? Is it possible? Regards AJ AJ, Use format... mm/dd/yy hh:nn:ss for 20/12/2007 06:00:00 Use format... #.0000 (with Decimal Places = to suit your needs) for 39436.2500 Use format... # (with Decimal Places = 0) for 39436 -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccs...

Insert trigger
Looking for some advice on SQL 2005. I have a table that will usually be populated by an SSIS package. I want to set the "loaddate" column to the current time after a record is inserted. Should i do this via trigger or should i just build a step in the SSIS package to update the column after the file loads? If trigger is the way to go, what is the syntax to create the after insert trigger? Thanks in advance. You can create a default constraint on the table set to CURRENT_TIMESTAMP. That will handle the automatic date assignment without any need for coding. -...

inserting hrs and minutes
I have a cell in my time card that displays total weekly time -ex- "40:15" is there a way to make it more like this...40hrs,15mins -- Message posted from http://www.ExcelForum.com Use a custom format hh"hrs",mm"mins" -- Regards, Peo Sjoblom "-Brian-H- >" <<Brian-H-.110wgs@excelforum-nospam.com> wrote in message news:Brian-H-.110wgs@excelforum-nospam.com... > I have a cell in my time card that displays total weekly time -ex- > "40:15" is there a way to make it more like this...40hrs,15mins ? > > > ...

POP3 server connect errors
Hello, WinXP Pro, Outlook 2k SP3 POP3 server connect failures. a) can send/receive emails under 100kb b) setup Outlook logging, and see server connect failures in logs for all email accounts across 3 domains. Things tried 1) All usual settings checked over, been running smoothly for months - ZoneAlarm, McAfee v8. Same results whether these disabled or enabled [did shut them down to test]. 2) Removed/Re-added Outlook email accounts. All settings standard POP3 110. Also tried increasing time-out. 3) Uninstalled/Re-installed Outlook 4) Moved outlook.pst and let Outlook recreate fresh pst...

can't execute remote proc linked servers....MSDTC error?
Error: The adapter "SQL" raised an error message. Details "HRESULT="0x80040e14" Description="The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "xxxx" was unable to begin a distributed transaction." HRESULT="0x80040e14" Description="OLE DB provider "SQLNCLI" for linked server "xxxx" returned message "No transaction is active."." Here's a snippet of code similar to what I have on Server1 (note the "exec" command which runs a pr...

Insert | File > Attachmnet-Button Drop Down ;What is the difference between Insert and Insert As Attachmnet
re: "Outlook2003, File-Insert-Options" On making new-email with Attachment-File(s), ** File Menu | Insert | File >>> (Brows and select File to insert ) then we can see the button "Insert", and write side Drop Down Arrow lower-right side of Dialog Box; If it clicked, we can see three options as follows: ** Insert Insert as text Insert as Attachment I can not recognize/understand the difference between "Insert" and "Insert as Attachment" *** What is the difference between Insert and Insert As Attachment ? I would appreciate y...

REPOST: MAD Monitoring Error after Installing SP1
Installed SP1 on both FE and single BE servers. The BE server is now reporting a MAD Monitoring error and is shown in "Maintenance Mode". The error is: MAD Monitoring is unable to read its configuration from the DS. Error 0x8000ffff. Ran DCdiag and all tests passed. The server has connectivity. Any thoughts? Kathy Leonard "K. Leonard" <leonard_kathy@hotmail.com> wrote in message news:<emiNfR#REHA.620@TK2MSFTNGP10.phx.gbl>... > Installed SP1 on both FE and single BE servers. The BE server is now > reporting a MAD Monitoring error and is shown in &qu...

insert an interactive excel file into word web page
I'm trying to insert a excel file into a word document with text, and then save it was as a web page, but I want to keep the excel part interactive. Any ideas? ...

Inserting Hyperlinks in a Protected Sheet
Hi I run Excel 2000 and I have a protected worksheet that I share wit users in my organisation. I want to allow the insertion of a hyperlin to a specific file type within a specified directory on our server. 3 Questions: 1.Protection on disables the insert hyperlink command. Can this b overcome with worksheet activate code? 2.Can I limit the types of files (preferably by requiring the file t meet a mask format eg "z-*.xls")? 3.Can I limit the directory that can be linked, by referring to pathname stored in a cell on the active sheet? Would appreciate your suggestions. Thanks S...

Insert with a where condition
Hi, sql 2005 I have an insert statement that is ignoring the where condition. That is, I want to insert records when they do not already exist in the destination table. INSERT INTO dbo.tblmnuGroupPerm ( gId ,mtfID ,... ) SELECT @gID ,mtfID ,... FROM dbo.locmnuTabFunction AS ltf WHERE ltf.mtfID NOT IN ( SELECT gp.mtfID FROM dbo.tblmnuGroupPerm AS gp WHERE gp.gId=@gID AND gp.Deleted=0 ) Any ideas or recommendations appreciated :-) Many thanks, Jonathan It's OK... <oops "redFace">I did not correctly se...

Insert
I want to overtype in a Publisher text box. I find I can only insert. The "insert" key doesn't do anything. ...

how to insert data in a table
Hi Exprets; I am creating an access database in which I want to insert data in already created table. Kindly help. Regards, Vikky Vikky <love.excel@gmail.com> wrote in news:1194124711.012302.269990 @e34g2000pro.googlegroups.com: > Hi Exprets; > > I am creating an access database in which I want to insert data in > already created table. > > Kindly help. > > Regards, > > Vikky > Data from where? Do you want to import it from excel, from a text file, copy it from another table or type it in manually? -- Bob Quintal PA is y I've altere...

Using Named Range for filename
I have a workbook that references various other workbooks on the server. All the files relate to the current month, so every month we do a find/replace to update the filenames. What I would like to do is store the filenames in the workbook and have each on as a named range. So instead of the formula =[g:\finance\shared]book1.xls!a2 I can use =book1!a2 I've tried doing this but each time it opens up the file explorer window and asks for a file. Thanks in advance David How about just making each one of your stored names as a Hyperlink? Vaya con Dios, Chuck, CABGx3 "...

How do you insert page numbers larger than 1000?
I have my purchase orders set up as a Publisher document. When our organization upgraded from Publisher 2000 to Publisher 2002, the new version set parameters on the page numbers. This was one of those things that worked just fine in the previous version... Does anyone know how to turn it off or change it? Hi mregen (mregen@discussions.microsoft.com), in the newsgroups you posted: || I have my purchase orders set up as a Publisher document. When our || organization upgraded from Publisher 2000 to Publisher 2002, the new || version set parameters on the page numbers. This was one of those...

Error when adding a custom field through Deployment Manager
I am receiving an error when trying to add a custom field through the Deployment Manager: "An error occurred during the addition of the new field. The addition failed. For more information, see the event log". The Application event log lists the following entry: "dmLog: Failed to grant access to the regenerated view Account after inserting new attribute CFSTest." My domain login has domain admin privelages and is a member of the System Administrator role in CRM. Any help with this would be greatly appreciated! this usually means the field is already there... if you c...

Conditional Formating, contain space
Hi All, How do I HIGHLIGHT a block of data that CONTAIN space?? For an Example, COLOUMN A1-A1000 contains TEXT data. I would like to highlight those cells that contains data. Thanks in advance. New Rule>Use a formula. =NOT(ISBLANK(cellref)) Gord Dibben MS Excel MVP On Wed, 3 Feb 2010 15:51:01 -0800, apache007 <apache007@discussions.microsoft.com> wrote: >Hi All, > >How do I HIGHLIGHT a block of data that CONTAIN space?? > >For an Example, COLOUMN A1-A1000 contains TEXT data. >I would like to highlight those cells that contains data....

Asynchroneous Plugins Execution Error
Hi everybody, I'm developping an account post-update asyncrhoneous plugin but am having trouble running it. It's the "Synchronize Account Address" example from the "Working the Microsoft Dynamis CRM 4.0" book. I copied the code AND register.xml file. I registered succesfully the plugin, but when I update an account, nothing happens. (The Asynchroneous service IS running) I do have the following error in the Applicaton Event (posted below). I even tried a empty Execute Method to make sure there is no error in the code, but still have the error. Any ideas?? ...

insert downloads into power point
i downloaded an application called "BioDigital Simulator" of an animated cleft lip/palate surgery and need it put into my power point presentation, but can't fiugre out how to do so.... very frustrating... What kind of file is this application? Is it a video? If so, what kind? MPEG? AVI? MOV? Or is it an EXE file? Something else? Which version of PPT are you using? -- Echo [MS PPT MVP] http://www.echosvoice.com What's new in PPT 2010? http://www.echosvoice.com/2010.htm Fixing PowerPoint Annoyances http://tinyurl.com/36grcd PowerPoint 2007 Complete Makeover...

Can't chart dynamic named range??
I have a named range call TMW with this gnarly formula =OFFSET(INDIRECT(ADDRESS(MATCH("TMW",Clients,0)+1,1)),0,0,IF(COUNTIF(Clients,"TMW")>12,12,COUNTIF(Clients,"TMW")),1) When I use GOTO and type TMW it selects the correct cells. Then I have another named range called TMW_ACTIVE with this formula =OFFSET(TMW,0,2,,) It simply takes the same range just over two columns. Again when I use GOTO and type TMW_ACTIVE it selects the correct cells. The issue is that I have charts that refer to TMW_ACTIVE and when the named range was hardcoded with values the charts w...

Error message on startup #2
I've started using my copy of Outlook 2007 that came along with Office 2007 Pro. Got it all coordinated with my email server but every time it (Outlook) opens I see the following message: http://tinypic.com/r/b5fg3o/3 Any ideas? Thank You All, -plh -- Where are we going and why am I in this HAND BASKET?? The error says it all; the issue is with an Avast add-in that you installed. You'll be better off reinstalling Avast without the email integration tools as it doesn't add an extra level of protection anyway. See http://www.msoutlook.info/question/20 -- Robert Sparnaaij [MVP-...

Spell check error
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I am constantly getting a spelling error message (red dots underneath the word) at the end of a sentence or next to punctuation mark. if i've deleted to the right and for a moment two words come together, the wrong spelling indicator comes on and won't go off until i right click on the word. that makes the red dots disappear. it's a big time suck, having to look to see if the word is spelled incorrectly, then doing the fix. i've put up with this in many versions and finally hope there's a fix. thank...

Case (in)sensitivity of table names/field names
Hi ! I would like to work with Microsoft Access 2003 and Windows XP or Windows Vista. Are table names case insensitive? What about field names? Thank you very much for your kind help. Peter Yes, both are case insensitive, as is data. IOW, a search for either peter or Peter would find you. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "peschrader" <peschrader@hREMOVEMEotmail.com> wrote in message news:up9WEFmeKHA.5136@TK2MSFTNGP02.phx.gbl... > Hi ! > > I would like to work with M...

text field validation 12-07-04
I am trying to create an validate event for Text fields on CRMAccount address fields. Whenever you try to change the values of these fields, it should alert the message. Here is the code like: In sfa\accts\acct_cont.js file, under window.OnLoad function: function window.onload() { ..... .... try { crmForm.address1_line1.onblur = validate; } catch (e) { alert("Error: " + e.message); } } function validate() { if (crmForm.ownerid.value == "{669282E2-2725-47A1-8234-3BD107C49487}") { alert("Not a authorized user. Please notify ...