I am trying to find out which staff records are in the Production system and not in development with this query: If the id_number is not in the dev system then we need to update. They both have different ip addresses.
select psv.first_name, psv.last_name, psv.login_name, psv.id_number
from [evolv_cs].dbo.staff_view psv
where psv.id_number not in (select psv.id_number
from [evolv_cs_dev].dbo.staff_view dsv)
Which gives this error:
Msg 208, Level 16, State 1, Line 1 Invalid object name 'evolv_cs.dbo.staff_view'.
I am not seeing how to run the query with both databases. When I look at object explorer only one of the databases appear so we get the error message. When I click on one database in Object explorer, then that is the one that is available.
I am sorry if this is so basic but - How do I run this so that both databases are present to the query?
I am trying to get both databases to be present for the query. So far only 1 is. Therefore, this query fails.
