× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 05-Jul-2017 23:19 -0600, Birgitta Hauser wrote:
[…] If the view itself is not qualified it is created in the QGPL
library (System Naming) […]

Again, I have never known that to be the case [except when the (first) based-on TABLE reference is in QGPL]; more specifically, is shown to be false, empirically. For example, all of my testcases over the years would have failed, because I use *LIBL for the unqualified run-time references to the VIEW in my SELECT activity per System-Naming, mostly after just previously having done the CREATE VIEW in the same script, and my library-list nearly always *excludes* QGPL. As well, the doc contradicts the claim:

From a link (https://archive.midrange.com/midrange-l/201605/msg00765.html)[SQL *SYSTEM naming default schema rule?] in my prior message:

(http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/db2/rbafzhcview.htm)[IBM i 7.2->Database->Reference->SQL reference->Statements->CREATE VIEW] "... view-name If system names <ed: system-naming> were specified, the view will be created in the schema that is specified by the qualifier. If not qualified and there is no default schema, the view name will be created in the same schema as the first table specified on the first FROM clause (including FROM clauses in any common table expressions or nested table expression). If no tables are referenced in the fullselect, the view will be created in the same schema as the first user defined table function. If no table or user defined table function is referenced in the fullselect, the current library (*CURLIB) will be used. ..."

Note: *CURLIB<>QGPL; QGPL is the current library, only as default, when no current library has been assigned.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.