DB2: Query Memberfile of a Table with SQL

34 Views Asked by At

I want to qry a member of a DB2 Table - I am not the owner of the Database. When I am running this:

SELECT * FROM LXXXXX.X99(MBR1)

I get that token "()" is not valid.

How should i do that?

1

There are 1 best solutions below

1
danny117 On BEST ANSWER

DB2 SQL

CREATE ALIAS MYLIB.MYMBR2_ALIAS FOR MYLIB.MYFILE (MBR2)
select * from mylib.mymbr2_alias
drop alias mylib.mymb2_alias

or mix of cl and sql you can override to the member before starting sql

OVRDBF FILE(Z1)          
       TOFILE(QTEMP/Z1)  
       MBR(X1)           

select * from z1

dltovr z1