John, one source of relatively complex SQL statements could be SQL catalogue
views. You can find them with something like:
WRKF QSYS2/*ALL LF
WRKF SYSIBM/*ALL LF
Then do a DSPFD to see the SQL statement contained within a view.
Readers could relate to these as they're mostly over cross-reference tables.
There are some UDTFs in there as well, but that just adds to complexity and
that's what you're after :)
Or are these still too 'light' for your needs?
Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com
-----Original Message-----
Subject: A really complex SQL statement
Hey list,
I'm writing an article on securing SQL and I'm looking for a really, really,
long and complex SQL statement. Unfortunately my own SQl skills are kind of
primitive, so I don't know how to generate this statement with the correct
syntax.
So, has anyone got a copy of one that has multiple file names, multiple
SELECT and UPDATE or DELETE statements, etc etc. The goal is not
"un-readability", but rather complexity specifically as it relates to
multiple tables and verbs in one statement.
This mailing list archive is Copyright 1997-2026 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.