?
Solved

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

Posted on 2014-12-12
2
Medium Priority
?
147 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
LordWabbit earned 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
There is a huge demand for CodeIgniter among the PHP web developers due to its dynamic features and benefits these days. It is one of most popular and agile open source PHP framework for creating robust web applications in PHP web development field.…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

764 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