Search for a particular string in Oracle clob column

前端 未结 5 1200
长情又很酷
长情又很酷 2020-12-14 16:18

How to get a particular string from a clob column?

I have data as below which is stored in clob column called product_details

CALCULATIO         


        
5条回答
  •  余生分开走
    2020-12-14 17:04

    ok, you may use substr in correlation to instr to find the starting position of your string

    select 
      dbms_lob.substr(
           product_details, 
           length('NEW.PRODUCT_NO'), --amount
           dbms_lob.instr(product_details,'NEW.PRODUCT_NO') --offset
           ) 
    from my_table
    where dbms_lob.instr(product_details,'NEW.PRODUCT_NO')>=1;
    

提交回复
热议问题