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

SQL of file with many members

  • Thread starter Thread starter WP
  • Start date Start date
Status
Not open for further replies.

WP

Programmer
Joined
Nov 30, 1999
Messages
463
Location
CH
Is it possible to select a specific member when querying a file in SQL/400?

WP

 
There are two ways that I know of. The first is to create an alias that you use in your select statement. The alias is a permanent object. An alias is created using the SQl command:

CREATE ALIAS AliasName FOR library/file (member)

Use it in a select statement:

SELECT * FROM AliasName

The second way is to issue an OVRDBF command specifying the file and member:

OVRDBF FileName TOFILE(FileName) MBR(member)

Then, in your program, use it with a standard select against the file name.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top