using SQL to order select ignoring case

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sat May 12 12:51:31 CDT 2012


On 5/12/12 7:58 PM, "william humphrey" <bill at bluewatermaritime.com> wrote:

Hi William,

> Why doesn't this simple SQL work?
> 
> select s_fullname from ships order by upper(sname)
> 
> I get error unexpected token "upper".
> 
> of course
> 
> select s_fullname from ships order by sname
> 
> does work but I want the sort to ignore case

1) if to check carefully Valentina SQL grammar,

<http://valentina-db.com/dokuwiki/doku.php?id=valentina:vcomponents:vsql:ref
erence:reference >

Then you can see that VSQL, as well as SQL Standard,
Do not allow expr  in the ORDER BY.

Instead should be 

select s_fullname, upper(sname)
from ships 
order by 2


2) if this is very often query, you can define calculated field with forumla
       upper(sname)

And make it to be indexed.



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list