Hello,

"Tomas V.V.Cox" wrote:
> 
> Manuel Lemos wrote:
> >
> > Hello,
> >
> > John Lim wrote:
> > > Each designer has a different point of view, like Tomas has
> > > written a really excellent oci8 "select limit" emulation, but looking
> > > at the code, it's so complicated that i decided not to incorporate it
> > > in ADODB because I value simplicity. I know Tomas' code works
> > > in theory, and its really impressive that you even considered UNIONs,
> > > Tomas, but I just like "simple" code that I can keep in my head.
> >
> > But it does not work with computed columns like those that apply
> > functions (COUNT, SUM, SUBSTRING, etc...). The code assumes that you are
> > actually selecting only real table fields. I think it also does not work
> > with columns with table name prefixes.
> 
> That's partially true. But it's a common practise to use column aliases
> in conyunction with functions (and a must for assoc fetchs) and this is
> supported by the code I wrote, for ex:
> 
> select count(field) as count from foo;

That would work, but you require people to change their queries. I guess
that does not work as general practice because.



> Also if Oracle name a sum(foo) column as "sum" will be trivial to add
> it.
> 
> Any way I said it later, a real SQL parser will be the solution. Stig
> came with the idea time ago and nowadays it will help a lot in many
> other cases.

I think that for Oracle there is a better solution that does not require
Oracle to fully run queries that may return millions of rows, when you
just want to return the first. That solution is to use server side
cursors.

Regards,
Manuel Lemos

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to