I have never used CREATE ALIAS (except to try out the syntax one time) so I can't help out with that.
I tried creating a view with FETCH FIRST n ROWS which will only work if it is encapsulated in a CTE or subquery.
Examples:
create view teslib.fetchview as
with fetch_cte as (
select * from sysibm.sysdummy1
fetch first 1 row only
)
select * from fetch_cte
OR
create view teslib.fetchview as
select * from (
select * from sysibm.sysdummy1
fetch first 1 row only
) A
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: Thursday, August 08, 2013 11:09 AM
To: midrange-l@xxxxxxxxxxxx
Subject: SQL views over multi member physical file
Hi everyone
Before I forget - we are on V5r4
We have a multi-member file (presently 16 members - but can increase) There is a need is to create individual SQL views over each of these members I understand/know about alias's, but from what I have googled/yahoo'ed/searched, it looks like I cannot create a view over an alias Question 1 - is this in fact true?
Question 2 - In creating the alias (or view for that matter), is there a way to limit the alias (or view for that matter) to the LAST n records?
As always - any and all responses gratefully accepted
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.