About 18,900,000 results
Open links in new tab
  1. SUBSTRING, PATINDEX and CHARINDEX string functions in SQL

    Mar 1, 2021 · In this article, we explore SUBSTRING, PATINDEX, and CHARINDEX using examples. SUBSTRING function in SQL queries. The SUBSTRING() function extracts the …

  2. SQL Server CHARINDEX() Function - W3Schools

    The CHARINDEX() function searches for a substring in a string, and returns the position. If the substring is not found, this function returns 0. Note: This function performs a case-insensitive …

  3. sql - Substring, Charindex - Stack Overflow

    May 18, 2017 · SELECT SUBSTRING (code, CHARINDEX('_', code, CHARINDEX('_', code) + 1) + 1, LEN(code) - (CHARINDEX('_', code, CHARINDEX('_', code) + 1) + 1) - …

  4. 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 …

  5. SQL Server CHARINDEX() Function - SQL Server Tutorial

    Use the SQL Server CHARINDEX() function to search for a substring in a string starting from a specified location and return the position of the substring.

  6. SQL CHARINDEX Function Use and Examples - SQL Server Tips

    Apr 23, 2025 · The CHARINDEX function is used to find the starting point where one string exists inside another string. This is often used with other functions such as SUBSTRING to find the …

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

    Feb 21, 2021 · In this article, we explored the SUBSTRING, PATINDEX, and CHARINDEX string functions in SQL Server. These functions are useful for retrieving specific text or data from …

  8. SQL Server CHARINDEX() Function: Returns Starting Index of Substring

    The CHARINDEX() function returns the starting position of the substring or character in another string. It returns 0 if substring is not found.

  9. How to Use SQL Server CHARINDEX () Function

    Feb 27, 2025 · SQL Server CHARINDEX function helps by quickly finding the position of a SQL Server substring. This makes it easier and faster to work with text in SQL. In this guide, we’ll …

  10. CHARINDEX Function in SQL Server

    Jan 4, 2024 · In this SQL Server tutorial, you will learn how to find the position of the substring in the string using the CHARINDEX function in SQL Server. First, you will understand ‘what the …

  11. Some results have been removed
Refresh