≡
×
Plus
Manual
Examples
Reference
Download
Blog
Community
Support
Help Needed with Sorting
Help Needed with Sorting
fxh
Posts: 3
Questions: 0
Answers: 0
July 2012
edited July 2012
in
General
I have a table column with the following data:
~ D
C
A
~ F
~ B
E
I'd like to sort it as:
A
C
E
~ B
~ D
~ F
But It gets sorted as
A
~ B
C
~ D
E
~ F
Any help would be appreciated
Replies
fxh
Posts: 3
Questions: 0
Answers: 0
July 2012
edited July 2012
http://live.datatables.net/ocezan/2/edit#javascript,html
allan
Posts: 65,846
Questions: 1
Answers: 10,956
Site admin
July 2012
What browser sorts your example incorrectly? I've just tried Firefox and Chrome and they sort it as:
[quote]
A
C
E
~ B
~ D
~ F
[/quote]
Allan
fxh
Posts: 3
Questions: 0
Answers: 0
July 2012
OK, solved:
I was using server-side processing, with a postgresql database. Issue was that my database locale was set to US. Workaround is to specify "COLLATE" for the relevant field
i.e SELECT * FROM MYTABLE ORDER BY MYFIELD COLLATE "C" ASC
Thanks
This discussion has been closed.
Replies
[quote]
A
C
E
~ B
~ D
~ F
[/quote]
Allan
I was using server-side processing, with a postgresql database. Issue was that my database locale was set to US. Workaround is to specify "COLLATE" for the relevant field
i.e SELECT * FROM MYTABLE ORDER BY MYFIELD COLLATE "C" ASC
Thanks