Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
String between two indexes
-- Query to remove the string between two indexes of delimiters DECLARE @NameString VARCHAR(MAX) = 'Suman,Saurav,Rajeev,Chandra,Mizan,Ahmed', @StartIndex INT = 0, @EndIndex INT = 21 SELECT STUFF(@NameString, CHARINDEX(',', @NameString, @StartIndex), CHARINDEX(',', @NameString, @EndIndex) - CHARINDEX(',', @NameString, @StartIndex), '')
run
|
edit
|
history
|
help
0
Return a single column that matches a parameter
List longest unique string for each id
M0413045.sql
Cross and outer apply
Left join producing wrong result
WORK
SQL injection
Names
20181117
mc170403050