Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6841335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:57:13+00:00 2026-05-26T23:57:13+00:00

I created a Database project by importing a schema from an existing database. In

  • 0

I created a Database project by importing a schema from an existing database. In the project I am creating stored procedures that merge data with another database… My issue is that I get a ton of Warnings on the data from the referenced database. Below I will include screenshots and the offending procedure

Stored Procedure

CREATE PROCEDURE [dbo].[GetContact]
    @ContactID [int]
AS
BEGIN

    SET NOCOUNT ON;

    SELECT 
        FirstName = COALESCE(a.FirstName, b.first_name),
        LastName = COALESCE(a.LastName, b.last_name),
        Organization = COALESCE(a.Organization, b.company),
        LanguageTypeID = COALESCE(a.LanguageTypeID, (CASE WHEN b.default_language = 'Spanish' THEN 3 ELSE 2 END))
    FROM [dbo].[Contact] AS a
    FULL OUTER JOIN [OldDB].[dbo].[contacts] AS b
    ON a.ContactID = b.contact_identification_number
    WHERE a.ContactID = @ContactID

END

Visual Studio

Schema Explorer

enter image description here

Error List

enter image description here

Warning 12  SQL04151: Procedure: [dbo].[GetContact] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].[Contact].[b]::[Default_Language], [*].[dbo].[Students].[b]::[Default_Language] or [*].[dbo].[Students].[Default_Language]. c:\users\*\documents\visual studio 2010\projects\TED\TED\Schema Objects\Schemas\dbo\Programmability\Stored Procedures\dbo.GetContact.proc.sql   21  52  TED

Any thoughts as to how I can reference another schema to get rid of these warnings so I can focus on real issues?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:57:14+00:00Added an answer on May 26, 2026 at 11:57 pm

    Your database project doesn’t know the the other databases of you server like “OldDB”. You should define a Database Cross Reference in the Project Properties.
    See the explanation here: http://publicityson.blogspot.com/2009/11/using-database-project-cross-database.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a new database project to group together all my useful stored procedures
I have database project in visual studio 2010. It has tables views stored procedures
Just created a database project and imported a large existing database. I have hundreds
I've created a database project and several databases projects that reference that project. I
I am attempting to create a Stored Procedure for a newly created database. However
I am using Fluent NHibernate on a project that has an Oracle 10g database.
I have created my first project in C# which uses sql server database (file
I have a database created out of my android project. There are some static
I'm using a database project (not the new database project that comes with Microsoft
I've created a Database project (.dbproj project file) in Visual Studio 2008, added a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.