>So, how do I get sqlite3 to recognize, and use, the thosusands separator "correctly"? You do not.
Jacob Price
You cannot use "," For anything except a parameter, except in a string. Hence you cannot use your strange separator. Just insert your value with numbers, or you could make a verification in whatever language you're used to by converting certain strings into real value before sending them in the database (by verifying each caracter in the string)
Christian Hughes
Thousands separator is formatting. Formatting does not belong in your database.
Daniel Perez
Try insert into mytable (ID, real_number) values (1, '9,999.9'); and see what happens.
Also this
Lincoln Gray
> "thousands separator" Wat
Anthony Murphy
Yes! That does work.
Thank you!
But I do wonder, is the value now being stored in the database as a REAL value, or as a TEXT value?
(The database was created with the real_number field as type REAL.)
Again, thanks for your reply.
Gabriel Wilson
Why don't you try and see what happens?
Isaiah Young
I did try it, and it does seen to work.
And since it does seem to respond to comparison operators as expected, I presume it still stores as a REAL value, and that the use of single quotes merely affects the display of the value to the user, not its "type".
Anthony Hughes
Serious question: Why doesn't formatting belong "in" a database.
Consider this: which is less likely to be erroneously typed in or read by the user?
364253986071 or 364,253,986,071
???
Henry Parker
A database stores data. It doesn't give a fuck about readability or shit input from idiot users
Justin Gray
Ask on stackoverflow
Dylan Harris
>Why doesn't formatting belong "in" a database. Because it is the end user who should decide how to display the data for them. Next you'll tell us that you want to store dates in your local timezone, won't you?
Aiden Cox
because you use the database to store DATA. You then use some kind of user interface that does the formatting. Like some GUI tool or web interface, there's no need to format in the database itself.
Dominic Roberts
No, my system "uses" UTC. But it does display the time/date in my locale.
Carson Johnson
>REAL value using "thousands separator" >REAL >"thousands separator" Separator is for string representation only