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

Markus Neteler neteler at itc.it
Thu Nov 23 03:49:52 EST 2006


Hamish wrote on 11/23/2006 03:38 AM:
> 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
>
> ?
>   
Hi Hamish,

please take a look at
http://grass.itc.it/pipermail/grass5/2006-February/021301.html

Markus




More information about the grass-user mailing list