Solved

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

Posted on 2014-12-12
2
124 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

21 Experts available now in Live!

Get 1:1 Help Now