Here is the sample stored procedure
DECLARE @ReturnTable TABLE (DateTime DATETIME,
WrongUSSD VARCHAR(30),
AllMSISDN INT,
UniqueMSISDN INT,
SubscriptionActivated INT)
SELECT *
FROM @ReturnTable
Modification in stored procedure is not allowed, I just need specific column form this procedure by select statement.
I have tried this
select WrongUSSD
FROM openrowset('MSDASQL', 'Driver={SQL SERVER}; Server=server_name;UID=user; PWD=pass;Trusted_Connection=yes;', 'EXEC [DatabaseName].[dbo].[ProcedureName] "2016-01-01","2016-04-01"') as a
This method doesn't work if the is link server exists in stored procedure
Is there any other method?? Please help
Using temp table:
INSERT INTO #TempTable
EXEC [dbo].[ProcedureName]
SELECT WrongUSSD
FROM #TempTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With