I am trying to copy the rows from the tables in database spendanalyzer to database KPI to put then in customer id 1
in KPI from customerid 7 in Spendanalyzer - the following code is getting an error" Msg 102, Level 15, State 1, Line 4
Incorrect syntax near '1'."
SET IDENTITY_INSERT [KPI].[dbo].[Transactions] ON
GO
insert into KPI.dbo.Transactions
(customerid = 1, TransactionId, DepartmentId, ItemId, CategoryId, Quantity, Cost, DateCreated, InvoiceNumber, DataSource, DataSourceId, ImportId, LastUpdate)
select customerid = 7, TransactionId, DepartmentId, ItemId, CategoryId, Quantity, Cost, DateCreated, InvoiceNumber, DataSource, DataSourceId, ImportId, LastUpdate
from SpendAnalyzer.dbo.transactions
in KPI from customerid 7 in Spendanalyzer - the following code is getting an error" Msg 102, Level 15, State 1, Line 4
Incorrect syntax near '1'."
SET IDENTITY_INSERT [KPI].[dbo].[Transactions] ON
GO
insert into KPI.dbo.Transactions
(customerid = 1, TransactionId, DepartmentId, ItemId, CategoryId, Quantity, Cost, DateCreated, InvoiceNumber, DataSource, DataSourceId, ImportId, LastUpdate)
select customerid = 7, TransactionId, DepartmentId, ItemId, CategoryId, Quantity, Cost, DateCreated, InvoiceNumber, DataSource, DataSourceId, ImportId, LastUpdate
from SpendAnalyzer.dbo.transactions