How to get only Website Name through query?

 Posted by vishalneeraj-24503 on 7/9/2014 | Category: Sql Server Interview questions | Views: 1835 | Points: 40

Write below query to get only website name
declare @Url as nvarchar(1000) = '';

select substring(replace(@Url,'http://www.',''),0,charindex('/',replace(@Url,'http://www.',''))) as [Website Only]


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response