Subject string questions
Author martinknappe
hello

1)

in sql, using the %-character, i can search for entries with string
fields as follows:

select field from table where field like '%something%'

now, what can i do if i want to search for entries where the string
really contains the %-symbol or if, for example, i want to search for
all entries where the field starts with a wildcard followed by
'something' followed by the %-symbol (theoretical question)

2)

I need a Firebird function - let's call it replace(string, old, new) -
that does the following:

-check whether old is a substring of string and if so, replace (the
substring, not the whole string) with new

I would write it myself but I don't really know how string operations
(like concatenation and so on work in sql and i don't want to write a
function that's already there)

thanx,


martin