Python Forum
Sqlite3 help with descending order
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sqlite3 help with descending order
#3
(May-17-2019, 06:45 AM)buran Wrote: Your "numbers" are stored as TEXT. So it is sorted as text. You either need to change the field type. Or if you HAVE TO store value as text (why?), cast it to INTEGER when query


Thank you,

It worked when I created a new table and made it REAL instead of TEXT. However, now it prints it like:
('Jim', 19.0)
('Mark', 3.0)

Do you know how to get it to print without the decimal?
Thanks.
Reply


Messages In This Thread
Sqlite3 help with descending order - by I_Am_Groot - May-17-2019, 06:09 AM
RE: Sqlite3 help with descending order - by buran - May-17-2019, 06:45 AM
RE: Sqlite3 help with descending order - by I_Am_Groot - May-17-2019, 07:01 AM
RE: Sqlite3 help with descending order - by buran - May-17-2019, 07:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to sort values descending from a row in a dataframe using python sankarachari 1 2,009 Aug-16-2021, 08:55 AM
Last Post: jamesaarr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020