0

I am using a spatialite database. I need to cast to double a negative number (this number is a text).

When I do SELECT CastToDouble("-5.84"), I get a NULL..

How can i Cast a negative number , in text format, to a Double?

Thanks!

Bae
  • 892
  • 3
  • 12
  • 26

1 Answers1

1

Just use SQLite's built-in cast expression:

SELECT CAST('-5.84' AS REAL)
CL.
  • 173,858
  • 17
  • 217
  • 259