charindex in sql server:
Charindex method is used to identify a particular character position in the string.
Thh syntax is Charindex(character or string to find , parent string).
This function will return an integer value.
Create Table #VenkatTable (fname varchar(50))
Insert into #VenkatTable values('1.doc')
Insert into #VenkatTable values('2.doc')
select charindex('.',fname) from #VenkatTable
Output is 2
Happy Learning!!!
Regards,
Venkatesan Prabu .J
No comments:
Post a Comment