savindrasingh
Board Regular
- Joined
- Sep 10, 2009
- Messages
- 183
Hello Experts:
I am using MS Excel 2007 on Win Xp. I have an excel sheet which have list of servers in column A starting from cell address A2.
I have a database instance from which I need to lookup for the server contact person and application contact person email address for each server listed there.
Below are the details of database and table from which I have to get the information:
Servername: CRBPRODKESP\SISP03<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
Authentication: Windows Authentication<o
></o
>
Database name: Runbook database
Table names: dbo_QRB_AppSupport (this is for Application contact person email address) and dbo_QRB_Customer (this is for Server contact person email address)<o
></o
>
Can any one please provide me with VBA code to extract this information.
Currently I have imported the tables to MS Access, created one input table and using below query to get this information and then copy and paste it to Excel.
I am after a code which I can run in Excel to find the Application and Server contact information from given Database/tables and fill the same next to the server name on the same sheet.
I am using MS Excel 2007 on Win Xp. I have an excel sheet which have list of servers in column A starting from cell address A2.
I have a database instance from which I need to lookup for the server contact person and application contact person email address for each server listed there.
Below are the details of database and table from which I have to get the information:
Servername: CRBPRODKESP\SISP03<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com




Authentication: Windows Authentication<o


Database name: Runbook database
Table names: dbo_QRB_AppSupport (this is for Application contact person email address) and dbo_QRB_Customer (this is for Server contact person email address)<o


Can any one please provide me with VBA code to extract this information.
Currently I have imported the tables to MS Access, created one input table and using below query to get this information and then copy and paste it to Excel.
Code:
SELECT InputServers.ServerName, dbo_QRB_Customer.EmailAddr, dbo_QRB_AppSupport.EmailAddr
FROM (InputServers INNER JOIN dbo_QRB_Customer ON InputServers.ServerName = dbo_QRB_Customer.ServerName) INNER JOIN dbo_QRB_AppSupport ON dbo_QRB_Customer.ServerName = dbo_QRB_AppSupport.ServerName;
I am after a code which I can run in Excel to find the Application and Server contact information from given Database/tables and fill the same next to the server name on the same sheet.
Last edited: