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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking DB2 to SQL and using the 4 part name for Selects

Status
Not open for further replies.

pabowen

Programmer
Nov 6, 2002
95
US
I am a SQL Administrator that has linked a db2 database to SQL 2000. However I have not been able to communicate using standard select statements with full 4 part names.

I am able to perform statements using an openquery, but that does not let me pass variables in stored procedures, which I need.

Is there a trick to the 4 part name on DB2?

I am structuring the 4 part names something like..

[linked dbase name].[schema name].[table name].[column name]

Am I doing something wrong, or does db2 not recognize standard 4 part names??

Thanks for all the help.
 
Hello Pabowen,

I don't think DB2 can work with the 4-part definition. The rule is that if you have made a connection to a database , the connection itself should serve as the first part of the definition. Have you tried:

[schema name].[table name].[column name]

or even:

[table name].[column name]

if the connect authentication is the same as the schema name ??

How do you link (ODBC ??)



T. Blom
Information analyst
tbl@shimano-eu.com
 
I thought it was 2 or 3 part names as follows. The column names are implicitly referenced by the table / view object that has been referenced

[database].[schema name].[table name]

or:

[schema name].[table name]

or the schema can be replaced by OwnerId

Mark.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top