Questions regarding lenght() function

Thorsten Hohage thohage at objectmanufactur.com
Sat Mar 31 06:14:43 CDT 2007


Hi Ivan,

On 2007-03-31, at 13:10, Ivan Smahin wrote:
> 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.

Yes THIS is obviously the natural was, but are you sure you TRY such  
a query, before suggesting it?????

Just because this was my first try and yes I forgot to mention it -  
sorry!

13:11:13: Error: "Order by not original-table field" is not supported.
13:11:13: Error: Kernel error: 0xa000
13:11:13: Error: "Order by not original-table field" is not supported.


> 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?

It's a bit to large (120+ tables), but if I've a moment of time left,  
I'm going to extract a sample, that's showing what goes wrong here.

Btw. all newest releases are installed, working on a MacBook, Mac OS  
10.4.9.


regards

Thorsten Hohage
--
objectmanufactur.com - Hamburg,Germany




More information about the Valentina mailing list