Instead of SELECT * or listing every column name, I'd like to put the
column names in a source member and "include" it in the main SQLRPGLE
compile. The source members are machine-generated; I'm doing this to
reduce the maintenance workload.

"from_src" is "a,b,c". "into_src" is ":a,:b,:c".

INCLUDE works with SELECT:
SELECT
INCLUDE from_src
INTO...

but the preprocessor won't accept
INTO
INCLUDE into_src
WHERE...

The error is SQL0104 and the preprocessor is looking for a comma or an
INTO. I have my INCFILE set correctly.

Using
FETCH NEXT FROM THIS_CURSOR INTO
into_src...

INCLUDE is tagged as a variable not found.

Am I missing something other than using dynamic SQL? It's just a reminder
of how incredibly productive DDS is!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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