|
Hi all
I am running some SQL queries to extract data and thought that adding a
"system" column to the extracted would be a good idea, rather than trying
to keep track of it in the file name, or having it hardcoded in the query.
So, for example, I have an SQL Statement as follows:
SELECT INTNUM,
(SELECT HOST_NAME FROM QSYS2.SYSTEM_STATUS_INFO) as SYSNAME
FROM QPFRDATA.QAPMSYSTEM
Which returns a bunch of SYSNAM and INTNUM columns.
My question is, is this the most efficient/best practise way of doing this
? I am wondering if running it this way will cause the query to be executed
for every row that gets returned.
What other ways are there that might be preferable or more efficient ?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.