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!

How to test if AS400 linked server table exists in T-SQL?

Status
Not open for further replies.

pwomack

Technical User
Apr 16, 2005
121
US
I need to determine whether a table in a AS400 linked server exists before I attempt to select from the table. I need the equivalent of the code below that is written for a SQL Server linked server.

Code:
IF EXISTS(SELECT 1 FROM myDatabase..sysobjects WHERE name = ''myTable_@date'' AND xtype = ''U'')

Thanks.

 
I believe "SELECT * FROM INFORMATION_SCHEMA.TABLES" does work on iSeries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top