All -
I realize this is off topic but I’m hoping someone might be able to point me in the right direction.
I’ve got a background agent connecting to a SQL server using ADODB.
So far everything is working but I’m looking for help in optimizing a SQL query (I need to send an email to all valid users).
In the SQL database I’ve got two tables:
Table A: List of valid users, primary key is the user’s network login id.
user_id
NT124
NT126
.
.
Table B: list of ALL users, primary key is network login id and additional column is their email address.
user_id email_address
NT123 user1@email.com
NT124 user2@email.com
NT125 user3@email.com
NT126 user4@email.com
.
.
I know that I can execute two queries that will get the job done (Query table B, then look up user in Table A) but I imagine their must be a way to execute only one query against both tables.
Thanks in advance…
Ernest