Oracle 12c SQL - Finding a specific string in a long data type column
I need to search for a specific string within a long data type field. The text contained within the field usually looks like:
Arrest Bond Added to Case with:
Action Code: AGGRAVATED DISORDERLY CONDUCT
Arrest Date: 07/21/2016
Bond Status: BOND SET
Status Date: 07/21/2016
Blanket Bond: No
Okay to Apply: No
Bond Type: PERSONAL BOND
Charge #1: AGGRAVATED DISORDERLY CONDUCT
I need to find entries that include the text string: Bond Status: BOND SET
...of course when I use basic syntax like:
from dkt d
where d.dkt_text like '%BOND SET%'
and d.dt >= to_date('01-jan-2016');
I get the error message: ORA-00932: inconsistent datatypes: expected NUMBER got LONG
00932. 00000 - "inconsistent datatypes: expected %s got %s"
Error at Line: 3 Column: 7
Is it possible to extract a specific string value from a long data type column?
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.