About 790,000 results
Open links in new tab
  1. SUBSTRING, PATINDEX and CHARINDEX string functions in …

    In this article, we explored the SUBSTRING, PATINDEX, and CHARINDEX string functions for SQL queries. You can retrieve a specific text, data using a combination of these functions.

  2. T-SQL Regular Expressions: SUBSTRING, PATINDEX and CHARINDEX

    Jun 12, 2023 · SQL Server CHARINDEX () function is used to search the position of a substring inside an input string. Unlike SUBSTRING (), this function starts the search from a specified …

  3. CHARINDEX () vs PATINDEX () in SQL Server – What’s the Difference?

    May 5, 2018 · Specifically, you’d use CHARINDEX() when you want to specify a starting position within the string to search. And you’d use PATINDEX() whenever you need to specify a …

  4. How do I use SUBSTRING and CHARINDEX in SQL to return only …

    Jan 2, 2020 · SELECT SUBSTRING (column, CHARINDEX('(', column)+1 , CHARINDEX(')', column)- CHARINDEX('(', column)-1 ) This works fine, however, in some instances, the data in …

  5. Exploring SUBSTRING, PATINDEX, and CHARINDEX in SQL Server

    Feb 21, 2021 · We can use the following query: SELECT [Messages], SUBSTRING([Messages], CHARINDEX('/', [Messages]) - 3, CHARINDEX(',', [Messages]) - CHARINDEX('/', [Messages]) …

  6. T-SQL String functions in SQL Server - T-SQL Tutorial

    This article describes how to use the T-SQL String functions in SQL Server database. String functions are: charindex, concat, replace, ltrim, rtrim, left, right, len, upper, lower, substring, …

  7. Manipulate Strings in SQL Server with REPLACE, TRIM, STUFF, CHARINDEX

    Mar 5, 2024 · Before SQL Server 2022, I would combine STUFF and CHARINDEX or even SUBSTRING and PATINDEX to solve this. However, my primary goal was to make this easy …

  8. SQL Server Substring with CharIndex

    In this article we are going to explore the T-SQL function CharIndex and also how to use it with another T-SQL function Substring (). CharIndex: This function returns the location of a …

  9. What is the Difference Between Substring and CHARINDEX in …

    May 16, 2024 · The major difference between Substring and CHARINDEX in SQL is the working outcome. No doubt, both commands are used to filter the code to find a specific term from the …

  10. SQL View SUBSTRING and CHARINDEX - Stack Overflow

    Jun 13, 2013 · Use REVERSE twice ;) SELECT [orde_reference] ,REVERSE(SUBSTRING(reverse([orde_reference]), 0, CHARINDEX('/', …

  11. Some results have been removed