convert

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Mar 30 04:17:41 CDT 2008


On 3/28/08 6:05 PM, "Mr. Bart Pietercil" <bart.pietercil at gmail.com> wrote:

Hi All,

> this is what Danny ment and would like to see functioning:
> 
> select levelname,ranking ,(cast(levelname as integer)) as intLevel
> from tbl_score_levels where objptr_rs = 1 order by intLevel
> 
> This query works if I leave out the order by part. Strangely enough
> the '(cast(levelname as integer)) as intLevel' is not rejected but it
> is not included in the resultcursor neither.
> 
> So what we would like to do is have a varchar field that we would like
> to sort like a number (because for this query levelname only has
> numbers in it) and this 'should' work as we feel it.
> This is why casting is for , no ?

The best way to solve this task is:

    * create in table method fldAsNumber = "levelname"

    * mark this Method to be indexed.

    * use it in your queries.


But ivan have try this way and see some glitch.
He now debug it. So lets hope next build will fix it.


Why it is not good to use way of fucntions for this, you want not just
SELECT it, but even SORT on it. Function do not have index. Method do have.




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