My stored procedure is trying to write a record in to a database on another Server. The statement is here:
IF @Builds > 0
BEGIN
SET @DPU = @Fa
In my case, it actually wanted to be run on the server where the INTO table would live:
SELECT *
INTO [database].[schema].[table]
FROM [server].[database].[schema].[table]
I had similar issues where I was getting the message when I was trying to execute the following code(make table)
"into SalesCube_temp.SalesCube_temp.dbo.ALL_SUPPLIER_SALES_METRICS_I"
I then Realized that I was using the incorrect Syntax and then rectified as
"into SalesCube_temp.dbo.ALL_SUPPLIER_SALES_METRICS_I"
IT WORKED, END OF MY STORY. But I spent nearly 10 to 15 minutes tr
Hope it will help somebody.
Please change the tables from the start and try to insert with the normal way
Use ManufacturingPortal
IF @Builds > 0
BEGIN
SET @DPU = @Failures / @Builds
INSERT INTO OPC.WriteRequests (ID, RegisterID, Value, RequestedDate, IsCompleted)
VALUES(@PLCID, 'F8:10' , CAST(@DPU AS NUMERIC(10,2)), GETDATE(), 0)
END