SQLTeam.com | Weblogs | Forums

Remove string in sql


#1

Hi everyone,

i have records 1.(abc/cde/efg/ghi),
2.(english/hai/merge)
i need result before the first / line.

eg: abc ,
english

thanks

rajnidas


#2
SELECT LEFT(YourColumNameHere, CHARINDEX('/',YourColumNameHere+'/')-1)
FROM YourTableNameHere;

#3

Its working

Thanks so much , JamesK