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



I haven't had a chance to research ALIAS. If you can OVRDBF an alias in a view, that would work.

Nothing in the tables themselves exist that could be used for selection.



-----Original Message-----
From: Vernon Hamberg [mailto:vhamberg@xxxxxxxxxxxxxxx]
Sent: Friday, January 27, 2017 11:21 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Override PF in view

Rob gave you an example of creating an alias and using it to create a view over it - an alias is actually a special kind of DDM file.

Mark's solution might be more germane - I assumed you wanted to override to a different member of the same file - so an alias can let you do that
- so can the older technique of doing an override before using the file or view.

So Mark is suggesting you have 2 views and override the view with another view that specifies your other table.

In any case, the OVRDBF needs to be executed when you are using the view, not when you create the view. This is because all a view has is the SELECT statement, and that execution should honor the override - I've not tested this. And maybe this is what happened to you, eh?

Another approach is to have an LF over both TABLE1 and TABLE1_2016 - SQL doesn't know this is really 2 tables - it sees it as one table.

Then in your programs, you can test for a field that contains the year - or dates in a year - just a thought that might not apply to your situation. We do this with some files that have members for each of multiple years - same basic idea - so a multiple member file can be read through an LF over the members you specify.

HTH
Vern


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.