The object name contains more than the maximum number of prefixes. The maximum is 3

后端 未结 9 2148
醉梦人生
醉梦人生 2020-12-20 12:15

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         


        
相关标签:
9条回答
  • 2020-12-20 13:12

    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]
    
    0 讨论(0)
  • 2020-12-20 13:14

    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.

    0 讨论(0)
  • 2020-12-20 13:22

    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 
    
    0 讨论(0)
提交回复
热议问题