Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Get the Domain Name, Page Name and Query Parameter from a URL

DECLARE @URL    VARCHAR(1000)
SET @URL = 'http://www.sql-server-helper.com/tips/tip-of-the-day.aspx?tid=58'

SELECT SUBSTRING(@URL, 8, CHARINDEX('/', @URL, 9) - 8) AS [Domain Name],
       REVERSE(SUBSTRING(REVERSE(@URL), CHARINDEX('?', REVERSE(@URL)) + 1,
       CHARINDEX('/', REVERSE(@URL)) - CHARINDEX('?', REVERSE(@URL)) - 1)) AS [Page Name],
       SUBSTRING(@URL, CHARINDEX('?', @URL) + 1, LEN(@URL)) AS [Query Parameter]
Comment

PREVIOUS NEXT
Code Example
Sql :: sqlalchemy database uri 
Sql :: product of a column in mysql 
Sql :: sql server bool select 
Sql :: mysql replication change database name 
Sql :: get statis values sql 
Sql :: PSQL qith variables 
Sql :: postgresql check if role exists 
Sql :: SELECT MAX(age) FROM Customers; 
Sql :: Find Last Fractal Function MQL4 
Sql :: convert databse to achieve log mode oracle 
Sql :: mysql type conversion 
Sql :: java check if something is in mysql table 
Sql :: IS THEre any difference between using default and := in plsql 
Sql :: oracle generate sequence of numbers 
Sql :: Alter precision 
Sql :: mode sql course 
Sql :: child row: a foreign key constraint fails 
Sql :: kimball data warehouse sql calendar 
Sql :: group_concat only returns one row 
Sql :: default order by in mysql 
Sql :: sql implicit cursor 
Sql :: mysql insert into select with recursive 
Sql :: how to set all the min and sec data to zero in sql server 
Sql :: how to make oppointment table in database 
Sql :: sql group by and having 
Sql :: T-SQL MERGE with condition what is not matched? 
Sql :: create user faunadb 
Sql :: CREATE PROCEDURE CategoryInsert (IN c02 VARCHAR) BEGIN INSERT INTO Category(CategoryName) VALUES (c02); END; 
Sql :: mysql dump everythign 
Sql :: unique veri seçme SQL 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =