Quantcast
Channel: SQL.ru: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 7251

Перенос строк из одной таблицы 1й базы во 2ю базу

$
0
0
Есть база smo3 в ней таблица [smo3].[dbo].[customers_contacts] в ней колонки id, full_name строки из них необходимо добавить в таблицу [oktell].[dbo].[A_Clients] в колонки (Id,Name)

использую такой запрос

insert into [oktell].[dbo].[A_Clients]
  ([Id],
  [Name])
  select id, full_name  FROM [smo3].[dbo].[customers_contacts]
   WHERE [smo3].[dbo].[customers_contacts].customer_id = [smo3].[dbo].[customers_contacts].full_name;

пишет ошибку
Msg 206, Level 16, State 2, Line 8
Operand type clash: int is incompatible with uniqueidentifier

Подскажите как правильно оформить перенос?

Viewing all articles
Browse latest Browse all 7251

Trending Articles