Avatar of Uziel
UzielFlag for United States of America

asked on 

AS400 Tables

Is there a way to run a list of the tables and their fields via SQL?  If so, how?  The table names in AS400 do not indicate what the tables are for and I have a hard time finding the tables I need.
Microsoft SQL ServerIBM System i

Avatar of undefined
Last Comment
Uziel
Avatar of daveslater
daveslater
Flag of United States of America image

hi
in sql you can use
select * from systables
and
select * from SYSCOLUMNS
Avatar of Uziel
Uziel
Flag of United States of America image

ASKER

When I run that I get error SQL0204 FIle not found
Avatar of daveslater
daveslater
Flag of United States of America image

try

select * from QADBXREF for read only
and
select * from QADBIFLD for read only

dave
Avatar of daveslater
daveslater
Flag of United States of America image

what version of the OS are you on?
Avatar of Uziel
Uziel
Flag of United States of America image

ASKER

I am querying AS400 using pass through queries from MS Access.  So, the syntax should match iSeries AS400 syntax.
Avatar of daveslater
daveslater
Flag of United States of America image

Hi
The version is so we can identify if the systables & syscolumns tables should exist. It may be just an authority problem.
IBM reccomend that you do not use the other tables that I have given.

Dave
Avatar of Uziel
Uziel
Flag of United States of America image

ASKER

Do you mean the OS used on AS400?  I have XP, if that is what you mean.
ASKER CERTIFIED SOLUTION
Avatar of daveslater
daveslater
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Member_2_276102
Member_2_276102

Note that the views systables and syscolumns may need schema qualifiers. Depending on settings for the connection, the qualification would be either qsys2.systables or qsys2/systables.

Tom
Avatar of Uziel
Uziel
Flag of United States of America image

ASKER

I apologize for not responding!  I accepted Dave's response because he stuck with the question.  I did get my question resolved, albeit in a different way.  Anyways, thank everyone for all your help.
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo