Hi Everyone,
Below is my SQL for a simple CASE statement and getting incorrect syntax message . Can somebody please help mein correcting the SQL
select Requestid,CSN1 = case CSN
when CharIndex(',',CSN)-1 < 0 THEN CSN
when CharIndex(',',CSN)-1 > 0 THEN Left(CSN,CharIndex(',',CSN)-1)
END
from VWCSN