[GRASS-user] sqlite and string function::how can I replace substrings in a table?

wqual wolfgang.qual at gmx.net
Tue Aug 8 04:12:05 EDT 2006


Hi Glynn,
you are right: the substr-function of sqlite is not what I was looking for. 
And I am no programmer (yet). But maybe there is someone outside, who already 
solved this? Maybe a nice perl-script (sqlite somehow seems to offer the 
possibility to activate regexp)?

Best regards,
Wolfgang

----8<----------------------
Am Montag 07 August 2006 pH:31:21 nachmittags/abends schrieb Glynn Clements:
> wqual wrote:
> > I need to replace substrings in my sqlite-attribute-table (e.g. ß--> ss,
> > ä --> ae etc.). I am wondering, if this is possible (but sqlite says: no
> > such function substring, no such function replace!).
>
> SQLite has a "substr" function and a concatenation operator ("||"),
> but it doesn't have any way to find the index of the character which
> you want to replace.
>
> So, you would either have to export the table to a text file and
> modify that, or write an extension using SQLite's C/C++ API.




More information about the grass-user mailing list