John,
you may also find a couple of really complex queries in the iSeries
Navigator - Performance Monitors.
Right click on an existing performance monitor (if there is no performance
monitor yet, just start one and end it after having executed a few SQL
statements)
Select Analyze. As soon as you get the Overview Screen, Select File -->
Preferences --> Show Modify Query Buttons.
If you position on a row in the overview table and click on the Modify
Button for either Summary or Detail, you'll get a script with the underlying
SQL statement that can be modified. (IMHO rather complex SQL statements ;)).
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Vern Hamberg
Gesendet: Wednesday, 03. June 2009 03:25
An: Midrange Systems Technical Discussion
Betreff: Re: A really complex SQL statement
John
You might take a look at a couple benchmarks - TPC-H comes to mind, I
think - a set of what are actually called complex queries - they were
used at IBM for testing the new query engine. Things in there like what
else did people buy who also bought this? Those are tough ones, usually.
This site -
http://www.tpc.org/tpch/ - had downloads of things - get the
PDF and search for (Q to see descriptions of the various queries, with
the actual SELECT statement for it.
HTH
Vern
John Earl wrote:
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.
Any and all assistance is greatly appreciated,
aTdHvAaNnKcSe,
jte
As an Amazon Associate we earn from qualifying purchases.