[Gambas-user] Tableview format

Fabien Bodard gambas.fr at ...626...
Fri May 18 12:59:14 CEST 2007


yes ron have true
i've not noticed that the codigo was in alphanum

the alphanum sort is not the same as a numerical one

if you want a good sort your numbers need to have the same length as the
comparison go from the left to the right.

01
02
03
12
13
14
20
21

so in your case the 1 is compared at the 1 of 10 and not at all the 10
value.


2007/5/18, ron <ronstk at ...239...>:

> On Friday 18 May 2007 00:38, nogueira_jr wrote:
> > Fabien Bodard escreveu:
> > > 2007/5/17, nogueira_jr <nogueira_jr at ...172...>:
> > >> Hi All:
> > >>
> > >> Please, help me in the TableView:
> > >>
> > >> I use SQLite3 and my table have:
> > >> codigo      alfanumerico 13
> > >> preco        float
> > >>
> > >> Problem 1: Tableview show the order:
> > >> CODIGO
> > >> 1
> > >> 10
> > >> 11
> > >> 2
> > >> 3 .....
> > >>
> > >> I want the correct order:
> > >>
> > >> 1
> > >> 2
> > >> 3
> > >> ....
> > >> 9
> > >> 10
> > >> 11
> > >
> > >
> > > use the sql statement :
> > > "SELECT * FROM MyTable ORDER BY codigo
> > Already I am using the ORDER BY codigo .....
> > ?????
> >
> >
> > > Problem 2: Tableview show the alignment:
> > > in the GridView1_Data  event :
> > > if Column=1 then GridView1.Data.Alignment=align.right
> > OK Correct !!!!!!!
> > Tks Fabien
> >
> > Nogueira
> >
> >
> >
>
> for mysql see http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
>
> http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat
>
> http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_right
>
> sqlite concat() I found this
> http://www.mail-archive.com/sqlite-users%40sqlite.org/msg11086.html
>
>
> http://en.wikibooks.org/wiki/SQL_dialects_reference/Functions_and_expressions/String_functions
> Substring from string str, starting from start, length of len
>         SUBSTR()  try SUBSTR(str, len[, start])
>
> Length of string x (in characters)
>         LENGTH(x)
>
> String concatenate
>         arg1 || arg2
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list