Dylan Leblanc
05-31-2003, 08:13 PM
I have some data I want to pull out of one field and put into another. The tricky part is that the field the data is in is a text field, and the data could be anywhere in there. So I need to do some sort of pattern matching to find it.
Here is an example of the query I want to run, but I don't know what to put for the question mark.
UPDATE Building SET architect = ? WHERE description LIKE '%Architect: %';
In the description field, architects are in this format:
Architect: name of architect
or
Architect: name of architect, http://example.com/
The name of the architect may contain commas.
So the pattern match needs to do this:
Find "Architect: "
then find ", http://" or "\n" or end of field after that
take the text in between and put it in the architect field.
Can this be done?
Here is an example of the query I want to run, but I don't know what to put for the question mark.
UPDATE Building SET architect = ? WHERE description LIKE '%Architect: %';
In the description field, architects are in this format:
Architect: name of architect
or
Architect: name of architect, http://example.com/
The name of the architect may contain commas.
So the pattern match needs to do this:
Find "Architect: "
then find ", http://" or "\n" or end of field after that
take the text in between and put it in the architect field.
Can this be done?