ALTER PROCEDURE Proc_DayShift
insert into #Punching_History SELECT * FROM SERVER2.MARS.DBO.TABLE1
SET QUOTED_IDENTIFIER OFF
SET ANSI_NULLS OFF
SET ANSI_WARNINGS OFF
The above stored procedure is showing error as
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.
I added the
server2 using linked server, when I run the query like this
SELECT * FROM SERVER2.MARS.DBO.TABLE1
It's executing and showing results.
When I run the query using stored procedure, it is showing this error message.
How to rectify this issue. what wrong in my query...?