Have a CLOB that contains the words "Account Number" in every record. In some records, that phrase is followed by a colon, then the account number. In some records, it's followed by more text.
I need to do a select on the account number in the CLOB so I can use it to update a field on another table. Assuming that I need the SUBSTRING function, but I'm not quite sure how to get what I'm after.
If the words "Account Number" are followed by ": 111111" where 111111 is any number (but not alpha), then it's a match. If "Account Number" is anything else, then it's not a match.
This is what I've got so far:
I need to do a select on the account number in the CLOB so I can use it to update a field on another table. Assuming that I need the SUBSTRING function, but I'm not quite sure how to get what I'm after.
If the words "Account Number" are followed by ": 111111" where 111111 is any number (but not alpha), then it's a match. If "Account Number" is anything else, then it's not a match.
This is what I've got so far:
Code:
UPDATE tbl_1
SET fld_1 = 'T'
WHERE custid=
(
SELECT custid FROM tbl_1, tbl_2
WHERE tb1_1.custid like tbl_2.clob
WHERE EXISTS tbl_2.clob like '%Account Number: '