Finding a substring with wildcard
Posted: Fri Mar 17, 2006 5:01 am
Hi All,
Is there any function where I can pattern match part of the string from an incoming field?
I want an equivalent function for the letters in bold:
UPDATE TABLE1
SET Col1 = 'DSX'
WHERE Col1 LIKE 'DSX%'
If the incoming data is :
Then the output should be:
I tried 'Matches' But it doesn't seem to work. I can use 'COUNT' as well. But is there a better way?
Your help is very much appreciated.
Thanks,
Naveen.
Is there any function where I can pattern match part of the string from an incoming field?
I want an equivalent function for the letters in bold:
UPDATE TABLE1
SET Col1 = 'DSX'
WHERE Col1 LIKE 'DSX%'
If the incoming data is :
Code: Select all
ULE
RSXoih
DSXchange
DSXhghghg
DSXigjoi099
DSX903u09ru0
DSXncc8
ULE
Code: Select all
ULE
RSXoih
DSX
DSX
DSX
DSX
DSX
ULE
Your help is very much appreciated.
Thanks,
Naveen.