Getting only Website Name through Query

Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 307
Suppose,we have following URL as:-, and we have to extract from above URL,then 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 Name]


Comments or Responses

Login to post response