[V4RB2] ORDER BY ?

Sims, John ayu8 at cdc.gov
Mon Apr 11 13:39:46 CDT 2005


> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of Eric Ferrer
> Sent: Monday, April 11, 2005 1:14 PM
> To: Valentina Developers
> Subject: Re: [V4RB2] ORDER BY ?
> 
> 
> 
> Hello,
> 
> > v2 do not allow to have ORDER BY on field which is not in SELECT 
> > Actually this is SQL92 standard.
> 
> >> Actually, you should have done the same in v4rb1
> >> as well. In my experience with V1, some querries
> >> work fine without order by items in select, but
> >> others do not. It's hit and miss scenerio, so is
> >> safer to include them.
> 
> Safer or standard, maybe...
> But the returned cursor will be bigger, generating more 
> network trafic, since you'll get fields that you won't use. 
> For some queries, this will not be an issue, for others, that 
> may slow down performances, don't you think?
> 
> Eric
> 

I tend to agree with Eric on this one.  The ability he describes is
available in both MS Access and SQL Server.  I have used this so much, I
actually thought it was part of the SQL standard.  Where this can become
extremely valuable is when binding to multi-column listboxes and
grid-type controls.  If the cursor only returns the columns you are
interested in displaying, you can very quickly and easily get the
listbox/grid filled in.  When you have to start paying attention to
additional columns required to sort the cursor, you now have more code
necessary to filter out those unwanted columns.

This doesn't really affect me at the moment because my current project
is using the API way almost exclusively, but I can definitely see where
Eric is coming.  Eric, I think one of us should at least put this in
Mantis as a feature request.

Take care,

-John 


More information about the Valentina mailing list