T&B <list.sql-s/[EMAIL PROTECTED]> wrote:
I have some imported data, where some fields contain numbers with commas denoting thousands separators. How can I change these to actual numbers?I tried using CAST, which only works with later SQLite versions, but it doesn't seen to know the comma as the thousands marker. For instance: sqlite> SELECT CAST('1,234,567' AS REAL); 1.0
Your best bet is probably to clean up the data before passing it on to SQLite. Just strip non-digit characters and convert to a number in whatever language your application is written. SQL is ill suited for string manipulation.
Igor Tandetnik
----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

