在這裏發生什麼問題就要瘋了。將表格數據插入到另一個表格
所有我試圖做的是:「從一個表以兩列,並插入到其他表」
,我使用的查詢是這樣的:
insert into Component_Capacitor values (Component_Capacitor.itemNo, Component_Capacitor.itemDescription)
select [Item No#], [Item Description] from dbo.Sheet1$ where
[Item Description] LIKE 'CAP %' ;
錯誤是這樣的:
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Component_Capacitor.itemNo" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Component_Capacitor.itemDescription" could not be bound.
我檢查了語法,表名和一切似乎很好。
列類型也相似(nvarchar(255),null)
任何想法,我究竟做錯了什麼?
從插入語句中刪除單詞「values」。 – Marc
@Marc:確切的。像魅力一樣工作。謝謝 –