The AS X just names the resulting table so you can reference the
fields...select x.objname, etc. Useful if you are joining multiple tables
that have matching field names but not so much with a single table.
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of James
H. H. Lampert via MIDRANGE-L
Sent: Thursday, September 12, 2024 1:33 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: James H. H. Lampert <jamesl@xxxxxxxxxxxxxxxxx>
Subject: Re: Easiest way to get a list of objects in a library, with their
last-changed date?
On 9/12/24 10:10 AM, Mark Waterbury wrote:
James,
In STRSQL, you can do:
SELECT * FROM TABLE (QSYS2.OBJECT_STATISTICS('QGPL','*PGM')) as X
Thanks.
While I could not do that directly on the systems of interest (V4R4 and
V5R2, with no STRSQL available), I *could* do it on a V7 box where the
product was installed.
Turns out I was really after creation timestamp. The object here was to make
sure I update everything that needs to be updated, before building a release
of a product.
Here's what I ended up with, after a bit of futzing around:
select OBJNAME, OBJCREATED, CREAT00001, CREAT00002
from table(qsys2.object_statistics('AQUESTVIEW','*PGM')) AS
X ORDER BY OBJCREATED DESC
Could somebody explain what the stuff in the FROM claus does? Is
"qsys2.object_statistics" some sort of function that returns a table or a
result-set? And what does the "AS X" do?
--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.