<snip>
And the simple act of imagining how a prepared statement could possibly
be halfway-practical for making SQL mimic the behavior of RLA when
absolutely nothing about the file is known at compile-time makes my
brain hurt.
</snip>

I tend to think the opposite. Having to create all the logicals and
whatnot to do a variety of Order By's, Where's, etc using RLA versus how
easy it is to do with SQL makes my head hurt.

Many of us, when faced with this problem in SQL tend to prepare statements
like this
where
(colA between ? and ?) and
(colB between ? and ?) and
...
And the variables can be quite flexible. High values, low values, The
same, for example
execute stmt using :RpgVar1, :RpgVar2, :RpgVar3...
if you want an equal there's nothing stopping you from having RpgVar1 set
to RpgVar2

See prepare statement, execute
in the Infocenter.


Rob Berendt




Return to Archive home page | Return to MIDRANGE.COM home page