About 60 results
Open links in new tab
  1. T-SQL in SQL Server 2025: Substring Changes – SQLServerCentral

    Oct 31, 2025 · This article takes a look at the changes in SQL Server 2025 to the SUBSTRING function.

  2. Extracting string after and before a Character/Pattern

    Aug 19, 2009 · If we want to extract before the character you would put the charindex as the number of characters and start position as 0 in the substring function ----select characters before / select …

  3. Get everything after and before certain character in SQL Server

    Jun 13, 2012 · I got the following entry in my database: images/test.jpg I want to trim the entry so I get: test So basically, I want everything after / and before . How can I solve it?

  4. How to substring string value in SQL Server 2008 - Stack Overflow

    Nov 21, 2012 · Select Substring('KLPI_2012_CBBE2_E_12704_2012-09-21_13_59_52',6,18) If you want to find it within the string, then CharIndex would be useful. Are you sure you want to do this in …

  5. Select substring from a column in SQL - Stack Overflow

    Feb 2, 2011 · select count (value) as count from table 1 join table 2 on substring (value,20,10)=substring (code,0,10) where reference='1'. this will work for 2nd query, but it is not way to do it. You are …

  6. Get everything before a certain character in SQL

    Feb 19, 2016 · SQL Server doesn't have SUBSTRING_INDEX (In this poster's defense, the only tag on this post when this was posted was the [sql] tag. Maybe just mention that this would work for MySQL?)

  7. sql - query for substring formation - Stack Overflow

    Jul 10, 2010 · RIGHT is only supported by SQL Server and MySQL. See my answer - there's no silver bullet for consistent substring function name & syntax across databases.

  8. T-SQL Substring - Last 3 Characters - Stack Overflow

    Dec 2, 2011 · Using T-SQL, how would I go about getting the last 3 characters of a varchar column? So the column text is IDS_ENUM_Change_262147_190 and I need 190

  9. sql - Substring in Where clause - Stack Overflow

    Aug 21, 2013 · Below is my query, I am looking to pull records where only the substring value (which will be YYYY) is less than current year - 25 years.... and I should mention that this field is varchar and pro...

  10. SQL Server - substring from position to end of string

    select SUBSTRING(field, 1, 25), SUBSTRING(field, 26, (LEN(field)-25)) from table but I'm getting this for the second substring: Invalid length parameter passed to the left or substring function What's wrong …