HI I have never used 2 databases before and am trying unable to find the syntax. I understand that you have to login to both systems. What I want to do here is see which staff have been entered into the production system but were not entered into the development system: I would be expecting to see between 10-40 results. The below query is getting this:Msg 208, Level 16, State 1, Line 1
Invalid object name 'evolv_cs_dev.staff_view'.
select psv.first_name, psv.last_name, psv.login_name, psv.id_number from [evolv_cs_dev].staff_view psv
where psv.id_number not in (Select psv.id_number from [evolv_cs].staff_view dsv)
I have an issue to run this. I have opened both databases in the object explorer they are both there. When I run the select statement against the dev db (evolv_cs_dev) it works, but when I change to production (evolv_cs), then this statement fails with error: Msg 208, Level 16, State 1, Line 1
Invalid object name 'evolv_cs.dbo.staff_view'.
When I click on "available databases" only one or the other is in the list. How do I run this so that both databases are present to the query?
Well, this error may also be due to an incorrect database name and a mismatch of schemas. You need to correct and check both of them, then try again.
Thanks