I would be careful with this. If you can alter the content of hte test names to also include some character that would never be used in a valid name it would help
like 'TEST#'.
If you cannot do that I would try to write it to follow only the structure for the test client names if there is one.
The reason you need to be careful on this is you may inadvertently remove other clients.
You can use the LIKE with *
table.name like '*TEST*'
this will find anything with TEST anywhere in the string
table.name like 'TEST*'
this will find anything with TEST at the start of the string
or use LIKE with ?
table.name like 'TEST ?'
this will find anything with TEST a space and any one character
or use a combination of the * and ? together
or instr() is naother option
Edited by DBlank - 14 Mar 2012 at 4:58am