August 22, 2015 at 7:03 am
DECLARE @ServiceStatus TABLE
(ServerName varchar(128)
,ServiceName varchar(128)
,StatusOfService varchar(128)
,StatusAsOn datetime)
INSERT INTO @ServiceStatus (StatusOfService)
EXEC master..xp_servicecontrol 'QueryState', 'msdtc'
UPDATE @ServiceStatus
SET ServerName=cast(@@SERVERNAME as varchar(128))
,ServiceName='Microsoft Distributed Transaction Coordinator'
,StatusAsOn=GETDATE()
--WHERE ServerName IS NULL
SELECT * FROM @ServiceStatus
The above code is part of a data flow task - code is in ole db source as sql code with a ole db destination(a sql table).I can preview the result in the ole db source but upon executing the data flow task the data is not inserted.The data flow task turns green with no data being inserted.
Can someone please help fix this.I need the data to be inserted into the ole db destination(sql table) when I run the data flow task.
Thanks
August 24, 2015 at 4:04 am
Hi
Use SET NOCOUNT ON before variable table declaration.
Br.
Mike
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply