× 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.



OK, we agree on being clearer.

But FWiW [re: "still, it seems"], I do not believe that such an assumption about what people think of a VIEW is beneficial in that regard. Although likely any SQL person already fully understands about what can be used in an SQL statement, someone who knows more about a "logical file" as LF would likely be familiar with things like "WRKF QSYS2/*ALL FILEATR(LF)". From that CL invocation they will see all of those database *FILE objects that are each an "LF", regardless that most of those [except the QASQ*] files are SQL VIEWs. Tell one of those people that they should not use an LF, and they could just as easily think that none of those files listed should be used in the FROM clause; i.e. instead of thinking, "Well, some of those LF might be a SQL VIEW".

I am not aware of any SQL statement that enables using an INDEX name where a TABLE name is expected. Admittedly for a moment I thought I had you on that one :-), thinking back that COMMENT ON and LABEL ON had always allowed referring to any SQL database *FILE, even requiring the token TABLE [prompted actually showed the word "File"], but I guess it is just the VIEW.

Regards, Chuck

Vern Hamberg wrote:
LOL

OK, I will try to explicate.

Yes, to say not to use an LF is perhaps not clear - still, it seems that people don't think of the implementation of a VIEW as
being an LF - you and I know that, but most don't think of the
lower-level stuff. Nonetheless, I agree for clarity.

An INDEX is also an LF and will never be allowed in the table list of a SELECT statement - or as a table in any statement that
I know of - is that right?

<<SNIP>>

CRPence wrote:
Since every SQL VIEW is a logical file, IMO it is best to attempt to be more clear by suggesting either to not use a DDS logical file [there is support for program described LF so even saying DDS LF is not entirely accurate], or that *if* using a LF then use only an SQL VIEW in a FROM clause. IIRC specifying an SQL INDEX logical file on the FROM clause gives an error; i.e. an SQL INDEX is explicitly prevented versus being allowed yet forced down CQE path as with DDS [keyed] LF.

<<SNIP>>

Vern Hamberg wrote:
One should almost never use a logical file in a query - SQL has
always ignored it and had to go back to the PF, then figure out
which index (LF) to use, by its own wisdom.

<<SNIP>>


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.