Solved

How to create a data model from a stored procedure that uses to different databases

Posted on 2014-12-12
2
117 Views
Last Modified: 2014-12-17
I have the following stored procedure.  
CREATE PROCEDURE Coll2014_FindResidentForRegistration
	-- Add the parameters for the stored procedure here
	@FName char(35), @LName char(30), @BDate char(10), @SSNum char(4)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
    -- Insert statements for procedure here
select OccuSeqNo,RTRIM(a.propertyid)+'-'+RTRIM(a.BldgId)+'-'+RTRIM(a.unitid)+'-'+rtrim(a.resiid) as fullid, b.status,b.ListedDate,b.OriginalAmt
from TAG_eSite.dbo.occupantheader a
right outer join CollectionSystem.dbo.Collection_Master as b on RTRIM(a.propertyid)+'-'+RTRIM(a.BldgId)+'-'+RTRIM(a.unitid)+'-'+rtrim(a.resiid) = b.fullid
where OccuLastName = @FName and OccuFirstName = @LName and Birthdate=@Bdate and RIGHT(OccuSSN,4)=@SSNum 
END

Open in new window


Now when I try to create a new data model from this stored procedure with vs2013 I end up with nothing because I believe the TAG_esite.dbo.occuapntheader is in another database.  

Do anyone have an example on how to do this.

thanks
0
Comment
Question by:mgmhicks
2 Comments
 
LVL 11

Accepted Solution

by:
LordWabbit earned 500 total points
ID: 40497163
Wherever you got the stored proc from had a linked server to TAG_eSite.
You need to recreate that on your development machine.
Linked servers is under the Server Objects tree element.
0
 

Author Closing Comment

by:mgmhicks
ID: 40505029
That worked
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now