存储过程跨数据查询Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options

消息 7405,级别 16,状态 1,过程 Queryxxxxx ,第 32 行
Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query.

解决方案:

GO
/****** Object:  StoredProcedure [dbo].[QueryNewProductL12MSale]    Script Date: 2020/6/12 12:09:32 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF

GO
/****** Object:  StoredProcedure [dbo].[QueryNewProductL12MSale]    Script Date: 2020/6/12 12:09:32 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO

-- =============================================

-- =============================================
-- Author:        <Author,,Archer>
-- Create date: <Create Date,, 2018年12月17日 >
-- Description:    <Description,,>Top 150 SKU Use it.  @stock_date='2016-12-6', @product='10101010601570' 
-- ============================================= 
ALTER PROCEDURE 
原文地址:https://www.cnblogs.com/panjinzhao/p/13098727.html