I'm looking to filter the resultset of a stored procedure. What I'd like is something like the following (non-working) syntax:
IF EXISTS ( SELECT 1 FROM (EXEC sp_linkedservers) WHERE srv_name = 'myServer' )
PRINT N'dropping linked servers'
GO
edit - this is just one example, I'd like a general solution if possible