BenJones12345 <benjpjo...@googlemail.com>
wrote:
> Ah... its version 3.3.5
>
> Unfortunately though I don't have the option of updating it, since I
> am using it on a very widespread set of machines which I don't have
> root privileges on...
>
> Is there another way I can achieve the same effect without this
> function?

If it's always the second character that needs replacing, you could try 
something like this:

UPDATE TheTable
set TheNewField =
    substr(TheOldField, 1, 1) ||
    (case substr(TheOldField, 2, 1) when 'P' then '+' else '-' end) ||
    substr(TheOldField, 3);

Hopefully, substr() function exists in the version you use.

Igor Tandetnik 



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

Reply via email to