Hi,
I run the similar query and I didnt get the any error.
create procedure abc as
select x.id,y.name1 from name1 x
inner join Practice.dbo.name1 y ON x.id=y.ID
Command executed successfully
EXEC abc
Result- it returns the matching rows.
Please try to run the query as select * from db_name.dbo.tablename ans check if it is returnug desired result or any error.
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/