use the following function
left(@test, charindex("https://stackoverflow.com/", @test) - 1)
More Related Contents:
- SQL Server dynamic PIVOT query?
- SQL Server – Best way to get identity of inserted row?
- SQL Server Process Queue Race Condition
- Is the NOLOCK (Sql Server hint) bad practice?
- SQL Server 2005 Pivot on Unknown Number of Columns
- Creating table names that are reserved words/keywords in MS SQL Server [closed]
- SQL – Subtracting a depleting value from rows
- Stored procedure or function expects parameter which is not supplied
- Pass table as parameter into sql server UDF
- SQL Server Convert Varchar to Datetime
- There are no primary or candidate keys in the referenced table that match the referencing column list in the foreign key
- OPTION (RECOMPILE) is Always Faster; Why?
- SQL server query to get the list of columns in a table along with Data types, NOT NULL, and PRIMARY KEY constraints
- SQL – Query to get server’s IP address
- Remove numbers from string sql server
- What is the equivalent of ‘describe table’ in SQL Server?
- Difference of two date time in sql server
- Modify Default value in SQL Server
- Unordered results in SQL
- Using PIVOT in SQL Server 2008
- Produce DISTINCT values in STRING_AGG
- Function in SQL Server 2008 similar to GREATEST in mysql?
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- Query times out from web app but runs fine from management studio
- How do I compare 2 rows from the same table (SQL Server)?
- Should I use the CASCADE DELETE rule? [duplicate]
- Dynamic order direction
- Why is RAND() not producing random numbers?
- SQL, How to Concatenate results?
- Should every SQL Server foreign key have a matching index? [closed]