Alter proc usp_UpdateWorksheet @PropMCName as varchar(50)=NULL as
declare @propid varchar(100) declare @sid varchar(100) declare @strstartdate varchar(100) declare @strenddate varchar(100)
Exec('DELETE FROM OPENROWSET(''SQLOLEDB'',''' + @PropMCName + ''';''sa'';''remoteserverpwd'', ''SELECT * FROM NV.dbo.Worksheet'') ')
Exec('INSERT INTO OPENROWSET(''SQLOLEDB'',''' + @PropMCName + ''';''sa'';''remoteserverpwd'',''SELECT [wLockNumber], [wControlID], [wControlIndex], [wControlCaption], [wRequire], [wLeft], [wTop], [wHeight], [wWidth], [wTabStop], [wTabOrder] FROM NV.dbo.Worksheet'') SELECT [wLockNumber], [wControlID], [wControlIndex], [wControlCaption], [wRequire], [wLeft], [wTop], [wHeight], [wWidth], [wTabStop], [wTabOrder] from test_worksheet ')
Print 'Updated.....' + left(@PropMCName,3)
go |