In your select list it should be "CURRENT_USER" not "Current_User" other than that little issue I see nothing wrong with it
Thanks,
Tommy Holden
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Thursday, April 27, 2017 8:57 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Querying an IBM supplied UDTF where some columns are reserved words
How do I query an IBM supplied UDTF where some of the columns are reserved words?
SELECT journal_code, journal_entry_type,
"Current_User", job_name, Job_user, job_number,
Remote_port, Remote_address, system_name,
Entry_Timestamp, Receiver_name,
Program_name, Program_library,
OBJECT, object_type,
X.*
FROM TABLE(QSYS2.Display_Journal('QSYS', 'QAUDJRN', -- Journal library and name STARTING_TIMESTAMP => CURRENT TIMESTAMP - 24 HOURS -- Time period
)) AS x
where "CURRENT_USER" in('TOM', 'DICK', 'HARRY') or
Job_user in('TOM', 'DICK', 'HARRY');
http://ibm.biz/DB2foriServices
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.