If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-05, 05:26
lakshmananl lakshmananl is offline
Registered User
 
Join Date: Oct 2005
Posts: 1
stored procedure

I have a clarification on stored procedures. Can a stored procedure be written for selecting all the fields from 2 tables with same table name and schemas. present in different databases.


Whether this is possible in Databases such as SQL server and DB2?



Thank you,

Lakshmanan
Reply With Quote
  #2 (permalink)  
Old 10-13-05, 08:05
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes. You need to read about "Federation". It will explain how to set up DB2 to have access to both tables as if they were in the same database. Then you can write the stored procedure.

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On