INSERT INTO alib/afile
(col1, col2, col3)
VALUES(:var1, :var2, :var3);
The above is free format RPGLE
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Buzz Fenner
Sent: Monday, March 26, 2012 2:24 PM
Subject: Output results from SQL SELECT into a table
I'm really digging being able to assemble multiple WITH/AS clauses with a SELECT statement to return results in an interactive SQL session, but I'm being asked to populate a table with the results. Short of using my debugged SQL code in an RPG program to write the output (can I even do that?) to a file, is there an easy and/or elegant way to do what I need?
From what I'm gleaning from the SQL manual, it doesn't seem that SELECT
output can be directed to a file.
Business Systems Analyst/Systems Administrator
City Water & Light
870.930.3374 | 870.219.5229
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l