Experts,
I have a table with two columns for a cursor. The first column is server name and the second is DB name. I have a table x in all the DBs in all the servers and I want to select from that table in all the DBs in all the servers.
I was trying to use a cursor to pass server name and DB name and add the dbo.x to select all from the table x. so like
SELECT *
FROM @SERVER_NAME.@DB_NAME.dbo.x
How can I use a cursor to pass (fetch values) the variable for the @SERVER_NAME.@DB_NAME
help truly appreciated
ebro