Questions regarding lenght() function

Ivan Smahin IvanSmahin at public.kherson.ua
Sat Mar 31 06:10:15 CDT 2007


Hello Thorsten,

Saturday, March 31, 2007, 2:00:28 PM, you wrote:

TH> Hi,

TH> what is wrong with this query

TH>         select idserial, length(descriptiontext) from cb_group order by
TH> length(descriptiontext) desc

TH> I got a
TH>         12:45:13: Error: line 1:1: unexpected token: (

You should do it in that way:
select idserial, length(descriptiontext) as 'A' from cb_group order by
A

BTW  -  seems  to  be more natural then duplicating expression just to
mention column in ORDER BY clause.

TH> Furthermore  this one

TH>         select max(length(descriptiontext)) from cb_group

TH> obviously produce a wrong result with returning 9, but this first row
TH> has a length of 13 and there must be some much longer text inside.

TH> Btw. descriptiontext is defined as Text, any ideas / comments?

Should  be  no problem there - could you send me that database?



-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list