How do I reference an object in another schema MS2005

There is a console application written that we cannot change the source code for.  It is a very simple application.  Somewhere in the application it has a stament along the lines of


This is referencing a database from a vendor application.  During a recent upgrade, the Carriers table became part of the 'PM' schema and now needs to be referenced as PM.Carriers.

Is there a way I can set it up so that the statement above will work.  Right now it is failing with an error saying Carriers does not exist.  I explicitly granted the SQL login the console application uses SELECT permission on the table - but it still did not work.  

Any help is appreciated.
Who is Participating?
BrandonGalderisiConnect With a Mentor Commented:
You can create a view called Carriers in the default schema that selects each column from the pm.carriers table.  

You can then place a(n) instead of insert/update/delete trigger(s) on the view if the console application needs to perform those actions.
create view SCHEMANAME.carriers
select fieldabc from PM.carriers

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.