You don't use a values clause when the source of the data is a select statement. See SQL BOL for an explanation of Insert.
insert into op_apps_daily.dbo.chktype
select * from norway.dbo.chktype If you want to get the best answer for your question read faq183-874 and thread183-468158. Terry L. Broadbent - DBA
SQL Server Page:
The where clause will not work, either. You must use column names not table names. NOT Exists is better than NOT IN. NOT IN can return erroneous results.
Where NOT EXISTS
(Select * From op_apps_daily.dbo.chktype
Where keycol = norway.dbo.chktype.keycol)
If you want to get the best answer for your question read faq183-874 and thread183-468158. Terry L. Broadbent - DBA
SQL Server Page:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.