【发布时间】:2013-10-22 16:14:48
【问题描述】:
编辑:
我有两个表表 1 和表 2,它们由 GUID 链接,我想在表 2 中搜索任何不在表 1 中的 GUID 并插入它们
我正在尝试使用 insert into select from where 语句,如下所示:
insert into WebCatalog.Published.DemoTracking (RCompanyLink, Purchased, DemoDate)
Select RC.Link, Purchased = 0, DemoDate = GETDATE()
from WebCatalog.Published.RCompany RC
where RC.Link != WebCatalog.Published.DemoTracking.RCompanyLink and RC.DemoLicense = 1
当它在存储过程中时,我不断收到 Invalid Object Name 错误,并且多部分标识符无法在引用中绑定
WebCatalog.Published.DemoTracking.RCompanyLink
尝试自行执行时出错。
我的陈述格式不正确吗?
【问题讨论】:
标签: sql tsql stored-procedures