On 09 Mar 2014 at 22:48, Igor Tandetnik <i...@tandetnik.org> wrote: 

> On 3/9/2014 6:37 PM, Tim Streater wrote:
>> Dammit, I looked up and down for 'strlen' and passed over 'length'! I had
>> been thinking about:
>>
>>    update mytable set path='/path/from/' || substr(path, length('/path/to/')
>> + 1)
>>    where path like '/path/to/%';
>>
>> that way I anchor to the start of the path.
>
> Be careful about '/path/to/' itself containing percent signs or underscores.

Thanks for the reminder, Igor.



--
Cheers  --  Tim
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to