NadJ
Ten Centuries
Points: 1031
More actions
December 29, 2004 at 7:45 am
#165612
I'm trying to find a way to look out for a certain character in a CASE statement.
e.g:
CASE
WHEN
FUNCTION1(NAME,'/')
THEN
Is there a built in function that can do be used like this inside a CASE statement?
Thanks
Frank Kalis
SSC Guru
Points: 111183
December 29, 2004 at 8:02 am
#535256
Something like this?
use pubs
go
select au_lname,
case when charindex('l',au_lname)>0 then au_lname else 'FRANK' end
from
authors
?
--Frank KalisMicrosoft SQL Server MVPWebmaster: http://www.insidesql.org/blogsMy blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 29, 2004 at 8:25 am
#535269
That'll do nicely....
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply