what is syntax for stripping characters from a field value and leaving the remaining to query against another field
Posted on 2011-02-25
I need to get the latter characters from a field and compare it with the field value in another table. What is the syntax to strip the characters that I don't need and use only the characters I do need in a query?
This is what I have:
select count(*) from dc_rule
where Doc_I in
(select pdf from holdings
where pub_date >='01-JAN-10'
dc_rule field has the following value:
I don't want to remove any characters. I just want to capture a portion of the value of the field and compare it to another field. For example I only want CPIA-1995-0525 in the above sample. Is that possible? If so How would I do this?