× 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 20-May-2016 14:33 -0500, Buck Calabro wrote:
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. <<SNIP>>

That doc reference, "IBM i 7.2->Database->Reference->SQL reference->Language elements->Naming conventions->Qualification of unqualified object names->Unqualified alias, constraint, external program, index, mask, nodegroup, package, permission, sequence, table, trigger, view", despite seemingly to imply generally, documenting what is the effect for every unqualified-name-reference for a VIEW object, that doc applies *only* to resolving\locating _referenced objects_.

Thus that documentation does not apply to the target-library of a CREATE statement for an unqualified view-name. Instead, applies to a VIEW[-name] that needs to be located\resolved per lack of a library-qualifier; e.g. when specified as a table-reference on a SELECT statement, or as a view-name on a DROP VIEW statement. Conspicuously, a /create/ does not resolve-to the object by that name, because the object must not exist to succeed.

As followup replies already note, the documentation for CREATE VIEW must be reviewed for how the library name is determined for the specification of an unqualified view-name in a "CREATE ... VIEW view-name" statement.

Note [understanding might require reading aforementioned followups]: The "CREATE OR REPLACE VIEW view-name" might seem to imply a possible resolve-to effect to find an unqualified view-name [e.g. the view-name in *CURLIB], per the SQL conspicuously must locate the view-name to be replaced. However using that syntax instead of "CREATE VIEW view-name" is not a means to overcome the conundrum presented in this topic\thread; that is because the first table-reference is resolved-to before the SQL tries to locate an existing view-name, and that resolved library name becomes the implicit qualifier for the view-name on the CREATE.


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.