As near as I can tell, views at V6R1 still cannot have ORDER BY in the outermost fullselect - here is some language from the SQL Reference in CREATE VIEW

The ORDER BY and FETCH FIRST clauses may not be specified except within a common-table-expression.

So maybe you can have a ORDER BY in the WITH .. AS (SELECT ... ) but not in the main body of the view. This would suggest that you can never specify a K in an F-spec when using a view in RPG.

Now indexes CAN be used as keyed access in RPG - they just don't have the field selectivity that is possible with logical files.

Someone help me here!!
-------------- Original message --------------
From: Mike <koldark@xxxxxxxxx>

Bummer, thanks. It sounds like we will be only doing SQL anyway so we should
be safe.

--
Mike Wills
Midrange Programmer/Analyst

Sick of corporate radio and hungry for something new?
http://thenextgenerationofradio.com
Stalking me? http://twitter.com/MikeWills | http://friendfeed.com/mikewills


On Tue, Sep 23, 2008 at 10:43 AM, wrote:

nope...until v6.1 views are unkeyed. in order to do a "chain" to the data
in the view you'll have to use embedded SQL.

Thanks,
Tommy Holden


From:
Mike
To:
"Midrange Systems Technical Discussion"
Date:
09/23/2008 10:40 AM
Subject:
Setting a key field on a view
Sent by:
midrange-l-bounces@xxxxxxxxxxxx



I am creating an SQL view for a file that strips out the spaces in a
particular field. My question is if there is a why to set a key on that
new
view so a person can still CHAIN the file. We are on V5R3.

--
Mike Wills
Midrange Programmer/Analyst

Sick of corporate radio and hungry for something new?
http://thenextgenerationofradio.com
Stalking me? http://twitter.com/MikeWills |
http://friendfeed.com/mikewills
--
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.



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


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

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2021 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.