Replace text in returned query
Posted on 2005-03-14
Hi, I have a table that stores a message that has been sent to a user. In the message there is information in the format:
somechar:##### (Example - ' Pin is P:1234 reference is R:123456')
What I want to do is hide this information in my frontend. IE, When I select the message, I want the returned result to contain (from example above) 'Pin is P:**** reference is R:******'
The message is stored in an nText field and both pin and reference numbers can be dynamic length, but will always be followed by a single space(unless the number is last element of message - like the R:123456 above).
Is it possible to write a select query to format the strings like this before returning a resultset. Because of the way the data is returned, it will be extremely slow to format it in the java app.