|
I would search for this, but I have no idea of the search terms. I vaguely
recall a relatively new SQL function that could auto-generate a list of
fields that could be used in a select statement. So, for example,
SELECT *magiclistoffields* from ABCTABLE
*magiclistoffields* is a result of another select (lateral???) that you can
exclude certain fields from the list. If ABCTABLE has fields FLD1, FLD2,
FLD3, and FLD4, I would like to select only fields FLD3 and FLD4, so that
the above select example is rendered as
SELECT FLD3, FLD4 from ABCTABLE
FWIW, I'm on v7r1 with somewhat recent TRs.
Pipe dream or reality?
- Dan
db2 "select COLUMN_NAME from QSYS2.SYSCOLUMNS where TABLE_NAME='COUNTRIES' and TABLE_SCHEMA='MYLIBRARY' order by ORDINAL_POSITION;" | awk '/SELECTED\./ {print
As an Amazon Associate we earn from qualifying purchases.
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.