Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 146
TSQL 76
SSRS 71
SSIS 68
XML 57

Top Categories · View All
SQL Server 146
TSQL 76
SSRS 71
SSIS 68
XML 57

sql server like

Dec 28 2012 12:00AM by ruboneswar   

I want to filter only lee but in result it showing leek also 


insert into rk_process (code,name,label) values ('01','lee001','aa' )
insert into rk_process (code,name,label) values ('01','lee002','aa' )
insert into rk_process (code,name,label) values ('01','lee003','aa' )
insert into rk_process (code,name,label) values ('01','leek001','aa' )
insert into rk_process (code,name,label) values ('01','leek001','aa' )

select name from rk_process where name like  '%lee%'

result:
lee001
lee002
lee003
leek001
leek001

But i want only (LEE)
lee001
lee002
lee003

Thanks in advance 



 

Submitted under: Microsoft SQL Server · TSQL ·  ·  · 


ruboneswar
1189 · 0% · 22

2 Replies

  • like 'lee[^k]%'

    like 'lee[0-9]%'

    commented on Dec 29 2012 3:23AM
    Leszek Gniadkowski
    8 · 18% · 5729
  • DECLARE @rk_process AS TABLE (code VARCHAR(3),name VARCHAR(15),label VARCHAR(10))

    insert into @rk_process (code,name,label) values ('01','lee001','aa' )
    insert into @rk_process (code,name,label) values ('01','lee002','aa' )
    insert into @rk_process (code,name,label) values ('01','lee003','aa' )
    insert into @rk_process (code,name,label) values ('01','leek001','aa' )
    insert into @rk_process (code,name,label) values ('01','leek001','aa' )
    

    SELECT * FROM @rk_process WHERE name like 'lee[^a-z]%'

    commented on Feb 7 2013 1:20AM
    jasmyjs
    229 · 1% · 199

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]