About 127,000 results
Open links in new tab
  1. SQL Server CONCAT() Function - W3Schools

    The CONCAT() function adds two or more strings together. Note: See also Concat with the + operator and CONCAT_WS(). Syntax

  2. sql - How to De-Concatenate a Field - Stack Overflow

    Feb 3, 2016 · Easiest way is using STUFF. If you have dirty data with more than one colon in some row or colon is missing, you can search from right to left for the first none numeric character, you could use this method, This can handle all sorts of funny data: STUFF(RIGHT('@'+ProgramField, PATINDEX('%[^0-9]%',REVERSE(ProgramField)+'@')),1,1,'')

  3. CONCAT (Transact-SQL) - SQL Server | Microsoft Learn

    Sep 3, 2024 · This function returns a string resulting from the concatenation, or joining, of two or more string values in an end-to-end manner.

  4. How to concatenate text from multiple rows into a single text …

    Oct 27, 2015 · In Oracle you can use the LISTAGG (COLUMN_NAME) from 11g r2 before that there is an unsupported function called WM_CONCAT (COLUMN_NAME) which does the same. If you are on SQL Server 2017 or Azure, see Mathieu Renda answer. I had a similar issue when I was trying to join two tables with one-to-many relationships.

  5. SQL CONCAT Function - SQL Tutorial

    To concatenate multiple strings, you pass them as a list of comma-separated arguments to the CONCAT function. The CONCAT function returns a string which is the combination of the input strings. It returns NULL if one of the arguments is NULL. You can use the IS NULL operator or COALESCE and NULLIF functions to handle NULL .

  6. String Concatenation) (Transact-SQL) - SQL Server | Microsoft …

    Jan 3, 2025 · The || (string concatenation) operator behaves differently when it works with an empty, zero-length string than when it works with NULL, or unknown values. A zero-length character string can be specified as two single quotation marks without any characters inside the quotation marks.

  7. SQL Server CONCAT Function By Practical Examples

    To join two or more strings into one, you use the CONCAT() function with the following syntax: The CONCAT() takes two up to 255 input strings and joins them into one. It requires at least two input strings. If you pass one input string, the CONCAT() function will raise an error.

  8. CONCAT () function in SQL Server - GeeksforGeeks

    Dec 28, 2020 · CONCAT () function can accept a minimum of 2 parameters and a maximum of 254 parameters. Syntax : Parameters : The given strings which need to be concatenated. The function concatenates all the given string and returns them as one whole string. Applicable to the following versions : The general working of CONCAT () function.

  9. SQL Concatenate Examples - MSSQLTips.com - SQL Server Tips

    Oct 5, 2021 · In this article we look at how to concatenate SQL Server data using various methods using concatenation operator, functions CONCAT and CONCAT_WS.

  10. An overview of the CONCAT function in SQL with examples

    Jan 13, 2020 · CONCAT function is a SQL string function that provides to concatenate two or more than two character expressions into a single string. Now, we will go into the point with a simple example. The syntax of the function looks like as follows: CONCAT ( string_value1, string_value2 [, string_valueN ] )