I have a view in my local db that references tables in another instance of SS (same physical server). It works perfectly. However, when I copy and paste the SQL from the view to a stored procedure, the table objects are not recognized. For e.g., rolling over a table reference in the FROM clause throws the pop-up:
Invalid object name 'AFIRALSRV06.AFI.dbo.RECEIVABLE'.
I am dbo on both databases/instances and logged in with windows authentication.
Also, the AFIRALSRV06 server is a linked server in my local database. This was set up before I got here 3 weeks ago, so could that link be creating a conflict? There are no logins configured in the linked server properties. But, as I said executing the query as a view works perfectly.
Any help would be greatly appreciated.