I am trying to use POW(x,n) with SQLite but it fails:
G65> v.db.select mapname column="POW(length,3)"
DBMI-SQLite driver error:
Error in sqlite3_prepare():SELECT POW(length,3) FROM mapname
no such function: POW
ERROR: Unable to open select cursor
Similar problem if I try x^n:
...
unrecognized token: "^"
ERROR: Unable to open select cursor
What I really want to do is add that value as a new column:
G65> v.db.update mapname column=volume value="POW(length,3)" --verbose
but I get the same error. It doesn't work with DBF either, but I sort
of expected that.
I am trying to use POW(x,n) with SQLite but it fails:
Hamish,
Mathematical functions such as POW() are not part of SQL. When you look at
what appear to be mathematical functions, e.g., ABS(). MIN(), MAX(), they
are actually string manipulations.
SQLite stores most values as text strings so this is not surprising.
I'd manipulate those values first, then pass them to SQLite.
I am trying to use POW(x,n) with SQLite but it fails:
G65> v.db.select mapname column="POW(length,3)"
DBMI-SQLite driver error:
Error in sqlite3_prepare():SELECT POW(length,3) FROM mapname
no such function: POW