Hello,
Right, I have got the following query to output the correct results:
My next stage is to get this to run as a loop. I have a list of server/dns device names I want it to connect to and pull back the same information from the same location.
How can I do this in SQL? I don't mind writting the statement out lots of times but I obviously need it to connect to different servers and authenticate (user / pass is same on each server). Would I need to write this in Excel or similar?
Also, the results window doesn't output the device name or instance name so if I were to run it as a loop, I've no way of knowing which servers figures it has pulled it back from.
Advice appreciated
Right, I have got the following query to output the correct results:
Code:
SELECT NetSalesAmount
FROM dbo.AccumGrossSales
WHERE PTD_ID = 0 AND BusinessDate = '2011/11/16'
My next stage is to get this to run as a loop. I have a list of server/dns device names I want it to connect to and pull back the same information from the same location.
How can I do this in SQL? I don't mind writting the statement out lots of times but I obviously need it to connect to different servers and authenticate (user / pass is same on each server). Would I need to write this in Excel or similar?
Also, the results window doesn't output the device name or instance name so if I were to run it as a loop, I've no way of knowing which servers figures it has pulled it back from.
Advice appreciated
