Posted - 11/07/2013 : 04:27:51
| Hi All,
I am trying to execute the following query in SQL SERVER 2012.
SELECT * FROM OPENROWSET ('SQLNCLI', 'Server=DBName;UID=newuser;PWD=newuser;', 'exec TESTDB.[dbo].[DeleteTableData]')
I am trying to delete a record from a Remote DB Server. The query gets executed without any issues, but does not delete the record. Also it does not throw an error.
CREATE PROCEDURE [dbo].[DeleteTableData]
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
delete from [TestDB].[dbo].[Table1] where id=1
select 1 as iREsult
Kindly help to resolve this issue.