This content has been marked as final. Show 3 replies
I want to find those record from below table starting with hash (#) only and after that if any char is encountered (along with hash), it should skip those records.
I use the below logic but its not working properly.
with abc as (select 1 id, '#man who is believed to be involved in #at least nine cases of rental scam' as name from dual union all
select 2 id, '#he Prince of #Wales became a princely #postman today' as name from dual union all
select 3 id, 'man who is believed to be *involved in at least nine !cases of rental scam' as name from dual union all
select 4 id, '#President visits the White House Thursday, and Truong' as name from dual union all
select 5 id, '#Nine people are believed to be missing after a barge capsized' as name from dual
select * from abc where instr(name, '#') =1
Output should be:-- ID : 4 and 5