Hi All,

Can I, within SQLite output (eg a SELECT statement) replace all occurrences of string 1 with string 2? For instance, if in the Description column output I want to change any occurrence of "string1" to "string2", can it be done? I imagine something like:

SELECT Replace(Description, 'string1', 'string2') FROM MyTable

I have managed to replace a single occurrence of a string that starts a field, like this:

SELECT 'string2' || substr(Description,1+length('string1'),length (Description)-length('string1')) FROM Test WHERE Description LIKE 'string1%';

But that only works if there's only one occurrence (or none) of string1 and if that occurrence is at the beginning.

Thanks,
Tom


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to