jknj72
asked on
Clean String function in SQL Developer
I want to write a function that will look for any variation of the LCF string below and want to replace it with the Last company name in the string, after the last 'LCF' in the string
Example:
Company A LCF COMPANY B L/C/F COMPANY C
Return: COMPANY C
What to look for:
"LCF", "-LCF", "L/C/F", "L/C/F,", "L.C/F/,", "L/C/F/", "L.C.F", "L.C.F.", "-L/C/F", "L/C/F-", "L-C-F", "LCF/", "L/C/F:", "LCF:", ".L/C/F", "L\C\F", "L\C\F:", ".L\C\F", ".L/C/F", "L C F", "LOST CONTENT FOR", "LOST CONTRACT FOR:"
I would like to pass in
Company A LCF COMPANY B L/C/F COMPANY C
and get back
COMPANY C
Thanks
Example:
Company A LCF COMPANY B L/C/F COMPANY C
Return: COMPANY C
What to look for:
"LCF", "-LCF", "L/C/F", "L/C/F,", "L.C/F/,", "L/C/F/", "L.C.F", "L.C.F.", "-L/C/F", "L/C/F-", "L-C-F", "LCF/", "L/C/F:", "LCF:", ".L/C/F", "L\C\F", "L\C\F:", ".L\C\F", ".L/C/F", "L C F", "LOST CONTENT FOR", "LOST CONTRACT FOR:"
I would like to pass in
Company A LCF COMPANY B L/C/F COMPANY C
and get back
COMPANY C
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I will have to try at work in the am. Glad you responded...Thanks for the help again
ASKER
I forgot I downloaded SQL Developer so I was able to test it at home and it worked like a charm
ASKER
Great job thanks
Glad to help!
If you find a case where it doesn't, just post a new question and the link to this one and we'll do what we can.
If you find a case where it doesn't, just post a new question and the link to this one and we'll do what we can.
ASKER
roger that
ASKER