Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to ignore the data based on specific keywords?

with data(No,Name ) as(
select 1,   'kumar unknow raja' union all
select 2,   'kumarunknowraja sameple' union all
select 3,   'kumartradraja testing' union all
select 4,   'kumar trad raja' union all
select 5,   'trad' union all
select 6,   'unknow' 
),
param (name) as (
select 'unknow' union all
select 'trad'
),
data2 (No,Name ) as(
select No,data.Name from data
join param on data.name = param.name 
union all
select No,data.Name from data
join param on data.name like ('% ' + param.name + '%')
union all
select No,data.Name from data
join param on data.name like ('%' + param.name + ' %')
)
select distinct * from data2
order by No
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ignore #data #based #specific
ADD COMMENT
Topic
Name
5+8 =