Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Find out the new features and enhancements added into SQL Server 2012, codenamed "Denali"

Moderators

Top Categories · View All
TSQL Enhancements 28
Discontinued Features 16
SSIS Enhancements 10
SSMS Enhancements 10
Database Engine 10
Database Administration 8
Security 3
Full Text Search 2
DataTime 1
Breaking Changes 1

Browse by Tags · View All
Denali 82
SQL Server 2012 79
SSIS 9
SSMS Enhancements 9
Analytic Functions 8
Usability Enhancements 5
SQL11 4
TSQL 4
Security 3
Database Engine 3
Datetime 3
Query Hints 2
OVER Clause 2
DMV 2
Groups 2
Dynamic Management Functions 2
DMF 2
System stored procedures 2
DBA 2
FTS 2

Browse by Release · View All
All 58
RC0 20
SQL Server 2012 Denali 2
CTP3 2
SQL Server Denali 1

What is new in SQL Server 2012 - Denali

CONCAT Function to concatenate two or more strings

Nov 28 2011 12:47PM by Ramireddy   

CONCAT function can be used to concatenate two or more strings. This function is available before in other databases like Oracle,MySQL etc. This feature will offer below advantages over standard concatenation operator(+)

  • If any of the string is null, standard concatenation operator will return null as output. However, CONCAT() function will ignore null values while concatenating.
  • As CONCAT() function is already available in other databases such as Oracle and MySql, while porting from one DB to other, this will gives more flexibility compared to standard operator.

The following example demonstrates a simple use case. One of the common mistakes people do is to forget to apply ISNULL when performing string concatenation. If one of the values happen to be NULL the result will be NULL too. The CONCAT function performs correct concatenation even if one of the values is NULL

DECLARE 
    @firstname VARCHAR(20) = 'Jacob', 
    @middlename VARCHAR(10) = NULL,
    @lastname VARCHAR(20) = 'Sebastian'

-- Without CONCAT function
SELECT @lastname + ' ' + @middlename + '' + @firstname
-- Returns NULL because @middlename is NULL

-- Using CONCAT function
SELECT CONCAT(@lastname, ' ', @middlename, ' ', @firstname) 
-- returns "Sebastian Jacob"

Read More Have you written a blog post or article related to this feature and want to get them added here? Read More...
Category : TSQL Enhancements
Release : All
Tags : CONCAT,Concatenation,Denali,SQL Server 2012,SQL 11


Ramireddy
2 · 41% · 12972
2



Submit

Your Comment


Sign Up or Login to post a comment.

"CONCAT Function to concatenate two or more strings " rated 5 out of 5 by 2 readers
CONCAT Function to concatenate two or more strings , 5.0 out of 5 based on 2 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]