Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross-Database join

Status
Not open for further replies.

PawelTru

Programmer
Jul 18, 2002
24
0
0
US
I am trying to access date in second database using stored procedure that is called from the first database. Both databses are located on the same server.
In MS-SQL it was simmple you just do:
Select * from DB2.DBO.TABLENAME

How do you do similar select statement in DB2.

Thank You
 
PawelTru,

I believe it works as follows

subsys2.schema.table

Cheers
Greg
 
PawelTru,

I have also seen it as

location.creator.name

Cheers
Greg
 
When I try to set it as follow

ACCPAC.busdat.apven

ACCPAC -> location
busdat -> schema
apven -> table

it returns me a error

ADMINISTRATOR.test: 13: [IBM][CLI Driver][DB2/NT] SQL0204N "ACCPAC.BUSDAT.APVEN" is an undefined name. LINE NUMBER=13. SQLSTATE=42704


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top