Is there a way to chose an AS/400 file member on the SQL SELECT statement?
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
The concept of multiple member files (tables) is foreign to SQL. However, as we all know, DB2 for the iSeries supports multiple member files.
In order to access any member other than the *FIRST one in a file you would have to do one of the following:
1. Create and alias pointing to the member you want to work with.
CREATE ALIAS AA for LIB.FILE(MBR) You would then reference table AA to select from your member....
2. You could use the Override Database File (OVRDBF) in your CLP, prior to executing a SQL statement.
OVRDBF FILE(file_name) TOFILE(lib_name/file_name) MBR(mbr_name)
Dig Deeper on iSeries SQL commands and statements
Related Q&A from Ken Graap
The only option to correct damage preventing file journaling is to use the RCLSTG command.continue reading
Find out if log files can be omitted during a save without causing problems in a full restore.continue reading
IBM's iSeries Backup and Recovery manual answers many questions related to system backup and disaster recovery.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.