On Thu, Feb 28, 2013 at 10:50 PM, Gert Van Assche <ger...@datamundi.be> wrote:
> All, I don't know if this is possible.
>
> A segment in table "Files" contains a record "Content" with a fields like
> this "XXX AAAA XXXX BBBB YYYY CCCC DDDD"
> Needs to become "XXX 123 XXXX 456 YYYY 78 90"
>
> Based on a "Translation" table were I have
>
> AAAA|123
> BBBB|456
> CCCC|78
> DDDD|90
>
> If I do
>
> UPDATE [Files] SET [Content] = replace(Content, (SELECT [Source] FROM
> [Translations]), (SELECT [Translation] FROM [Translations]));
>
> only the first match is replaced and I get: "XXX 123 XXXX BBBB YYYY CCCC
> DDDD"
>
> Is there a way to "translate" BBBB, CCCC and DDDD as well?

It is so much easier and faster to do this in programming language.
SQL is not suitable for things like that.


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

Reply via email to