Sqllite Order by

Prosg

Active Member
Licensed User
Longtime User
Hello,

I have a strange result with this :

Cursor1 = SQL1.ExecQuery("SELECT numeroBoite, nomSociete, nomContact, email, qrcode, derniereNotification FROM clients ORDER BY nomSociete ASC")

the order is :

O...
a...
b...
c...
d...

Why the o is different of O

How can i resolve this if users write maj and no maj text ?
 
You can do this. It will sort them regardless of upper or lower case and it will not physically modify your data. C'est tout ce qu 'il faut.
Code: Copy
Cursor1 = SQL1.ExecQuery("SELECT numeroBoite, nomSociete, nomContact, email, qrcode, derniereNotification FROM clients ORDER BY UPPER(nomSociete)")
You do not need ASC if the sort is ascending.
 
Upvote 0
I Believe that this should work also.

Cursor1 = SQL1.ExecQuery("SELECT numeroBoite, nomSociete, nomContact, email, qrcode, derniereNotification FROM clients ORDER BY nomSociete COLLATE nocase")
 
Upvote 0

Similar Threads

Back
Top