[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 446
  • Last Modified:

Accesing a mutli member file through ODBC SQL

I am accessing files through the iSeries IDBC driver like this:

SELECT * FROM GQPL.F0901

Does anyone know the ODBC SQL syntax for accessing a multi member file?
0
nmcdermaid
Asked:
nmcdermaid
  • 2
  • 2
1 Solution
 
Dave FordSoftware Developer / Database AdministratorCommented:

There are a couple different ways to do it, but I prefer creating an alias to point at the member in question.

e.g.
CREATE ALIAS mylib/MyAliasName FOR mylib/MyTable (MEMBERNAME);

select stuff from MyAliasName ;

drop alias mylib/MyAliasName;

HTH,
DaveSlash

0
 
nmcdermaidAuthor Commented:
So there is no syntax to access it directly?
0
 
Dave FordSoftware Developer / Database AdministratorCommented:

You could do an OvrDBf command before your select to point it at a certain member, but there is no way to access it directly in one shot.

HTH,
DaveSlash
0
 
nmcdermaidAuthor Commented:
Thanks very much, I've passed that on to the DB2 developer (who knows what you're talking about) and thats solved the problem.

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now