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

DB2 Query -512 error

Status
Not open for further replies.

YL5956

MIS
Jul 11, 2001
73
US
I'm running a query that select rows from a db2 subsystem and then cross-referencing those rows to a table on a different db2 subsystem.

My query is running into a -512 error. Does anyone know why I'm getting this error?

Select Pkg_name from RMS.COMPONENT
where pkg_name is not in
(select pkg_name from RTD.CM_BSLN_TRACKING)

The RMS.COMPONENT table is in the DB2X subsystem while the RTD.CM_BSLN_TRACKING table is in the DB2Y subsystem.

Any help would be greatly appreciated. Thanks.
 
I think that if you are referencing tables across different db2 subsystems you will need to fully qualify the table ie subsystem.owner.name. Taking your example, you would have to say:

SELECT PKG_NAME FROM DB2X.RMS.COMPONENT
WHERE PKG_NAME IS NOT IN
(SELECT PKG_NAME FROM DB2Y.RTD.CM_BSLN_TRACKING)

Hope this helps,
Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top