Home Forums Programming General Syntax request needed. Merge an 'openquery' select towards linkedserver RE: Syntax request needed. Merge an 'openquery' select towards linkedserver

  • I need more help with another query towards a linked server ... pardon my ignorance with the syntax 🙂

    I'm trying to merge these two queries to get the linkedserver along with all databases from it's instance.

    select * from openquery([abc],'SELECT *, CONVERT(VARCHAR(25), DB.name) AS dbName from sys.databases DB')

    and

    select * from openquery([abc],'select name, @@version from sys.servers where server_id =0')