iSeries / AS400 FAQ : (Category) Programming : (Category) SQL : How do I access a specific member with SQL?
You can create logical files that point to a particular member or use the SQL CREATE ALIAS function. Here’s an example: CREATE ALIAS mylib/SALESJAN for prodlib/SALESFIL(JAN). If running an iSeries program, you can also do an OVRDBF SALESFIL TOFILE(prodlib/SALESFIL) TOMBR(JAN). This works with ODBC if you create a stored procedure and call that from ODBC. Use the member name as one of the parameters and do the override there.
Related Questions
- iSeries / AS400 FAQ : (Category) Programming : (Category) SQL : Where can I look up SQLCOD and SQLSTATE values?
- iSeries / AS400 FAQ : (Category) Programming : (Category) SQL : How do I access a specific member with SQL?
- iSeries / AS400 FAQ : (Category) Programming : (Category) SQL : Can I use SQL in a CL program?