Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Accessing an explicit file member using interactive SQL

Can you access an explicit file member using interactive SQL? I want to access a multi-member *PF.
Yes, the easiest way is to create an alias for each secondary member that you want to access, and then use the ALIAS name on your SQL request. Creating an alias is just a one-time setup operation.

Here's an example:
CREATE ALIAS mylib/a1 FOR mylib/myfile(mbr1)

SELECT * FROM mylib/a1 WHERE f1>0

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Check out this Search400.com Featured Topic: Database issues resolved

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: Tips, tutorials and more.

This was last published in July 2004

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

2 comments

Send me notifications when other members comment.

Please create a username to comment.

Yes. First do CREATE ALIAS over the member you want. Now do your sql statement over that AILIAS
Cancel
Or you can do any override database file command prior to starting SQL to the member you require 
Cancel

-ADS BY GOOGLE

SearchDataCenter

Close