|
I have a situation on 7.2 where I want to create a view without
qualifying the name. That is, I want to use the library list. I've
read the documentation at
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/db2/rbafzqualun1.htm
which says 'For system naming, the default schema is the job library
list (*LIBL).'
I don't know what that means.
cl: chglibl (libsql1 libsql2);
-- this goes into QGPL
create table table_master
(id int,
text char(25));
-- this goes into LIBSQL1
create view view_zero
(id, text)
as (select id, text from table_master);
-- make a child table in a different library in *LIBL
create table libsql2.table_child2
(id int,
text char(25));
-- this goes into LIBSQL2
create view view_two_subselect
(m_id, m_text, c_id, c_text)
as (select m.id, m.text, m.foreign_key, (select text from table_child2)
from table_master m);
Three separate CREATE statements, three separate destinations. Is there
a reference for what is supposed to happen?
This came up because a colleague is convinced that CREATE VIEW with an
unqualified view name will put the new view into the first library in
the library list. He determined this empirically some years ago, and
got surprised today that his script put a new view farther down in the
*LIBL.
Full example script at http://code.midrange.com/c28c3aef48.html
--
--buck
Visit wiki.midrange.com and register for an account. Edit a page that
helps you, and because it's public, you'll help someone else, too!
--
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.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.