Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my scenario
where
case Isvalid
when 'true' then name like '%a'
end

error showing "incorrect syntax"
Posted

1 solution

it should like this
SQL
select * from
tblnm
where name like (case when Isvalid = true then '%a' else '' end)

Happy Coding!
:)
 
Share this answer
 
Comments
josh-jw 21-Dec-12 2:08am    
thnx aarti
Aarti Meswania 21-Dec-12 2:17am    
Welcome! :)
Glad to help you!
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900