[GRASS-user] SQL syntax in DBF vs SQLite for substring matching

Hamish hamish_nospam at yahoo.com
Wed Nov 22 21:38:59 EST 2006


Hi,

this works with DBF but fails with SQLite:
  where="str_2 ~ 'Wed'"

DBMI-SQLite driver error:
Error in sqlite3_prepare():SELECT cat FROM icebergs WHERE str_2 ~ 'Wed'
near "~": syntax error


with SQLite it has to be:
  where="str_2 LIKE '%Wed%'"



is "~" non-standard SQL? is there other syntax which can't be trusted
to work the same? (not including DBF limitations)

see
 http://grass.ibiblio.org/grass63/manuals/html63_user/grass-dbf.html

?

thanks,
Hamish




More information about the grass-user mailing list