Replacing text during parsing? [message #11038] |
Tue, 02 March 2004 14:41 |
Spumoni
Messages: 3 Registered: March 2004
|
Junior Member |
|
|
This is is really simple (for any pro)
Incoming text is something like:
grids: 12x32y
I need it to say
grid: 12x32y
What's the easiest way to fix this?
|
|
|
|
Re: Replacing text during parsing? [message #11040 is a reply to message #11038] |
Tue, 02 March 2004 15:59 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Is this data in a table? Data about to go in a table? I'm not sure what you mean by "incoming text."
If "c" is a variable or column name containing the original text ("grids"):
sql>select c,
2 replace(c, 'grids', 'grid') one_way,
3 substr(c, 1, 4) || substr(c, 6) another_way,
4 replace(c, 's:', ':') yet_another_way
5 from (select 'grids: 12x32y' c from dual);
C ONE_WAY ANOTHER_WAY YET_ANOTHER_WAY
------------- ------------------------------ ------------ -------------
grids: 12x32y grid: 12x32y grid: 12x32y grid: 12x32y
|
|
|
Re: Replacing text during parsing? [message #11041 is a reply to message #11040] |
Tue, 02 March 2004 16:05 |
Spumoni
Messages: 3 Registered: March 2004
|
Junior Member |
|
|
The data is not yet in any table AFAIK, it is part of a raw text message that gets parsed so that locations and names of items, buildings, and locations can be placed on a map or searched for.
|
|
|
|