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


Upload Image Close it
Select File

i-catching solutions
Browse by Tags · View All
SQL Server 26
Script toolbox 16
T-SQL 12
SQL 12
Geniiius 8
SQL Server 2012 7
Performance optimization 6
DMV 5
debugging 5
Debugging 5

Archive · View All
November 2011 6
May 2012 4
April 2012 4
January 2012 4
February 2012 3
March 2012 3
October 2011 2
December 2011 2
September 2012 1
June 2012 1

Geniiius's Blog

CONCAT() – SQL Server 2012

Nov 29 2011 12:00AM by Geniiius   

With SQL Server 2012 a new string function is born – CONCAT(). The output is a string, as the result of the concatenation of two or more strings – if the input is another type than string a conversion will be done implicit. The CONCAT() function takes between 2 and 254 parameters.

Here is how the syntax looks:

CONCAT ( string_value1, string_value2 [, string_valueN ] )

Read the full BOL documentation here. Let’s have a look at code use cases.

/* The Simple one */

SELECT CONCAT('AGF','Vinder','Guld','I','2012') as GeniiiusOutput

Output: AGFVinderGuldI2012

/* Handling non varchar datatypes */

DECLARE @text1 varchar(10) = 'AGF'
DECLARE @text2 varchar(10) = 'Vinder'
DECLARE @text3 varchar(10) = 'Guld'
DECLARE @text4 varchar(10) = 'I'
DECLARE @Num1 int = 2012

SELECT CONCAT(@text1, @text2, @text3, @text4, @Num1) as GeniiiusOutput

Output: AGFVinderGuldI2012

/* Handling null values */

DECLARE @text1 varchar(10) = 'AGF'
DECLARE @text2 varchar(10) = 'Vinder'
DECLARE @text3 varchar(10) = null
DECLARE @text4 varchar(10) = 'I'
DECLARE @Num1 int = 2012

SELECT CONCAT(@text1, @text2, @text3, @text4, @Num1) as GeniiiusOutput

Output: AGFVinderI2012

This is for sure a feature that I have been missing, and already now it has become my new best friend.

@Geniiiuscom


Republished from geniiius.com [45 clicks].  Read the original version here [32134 clicks].

Geniiius
133 · 1% · 369
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"CONCAT() – SQL Server 2012" rated 5 out of 5 by 1 readers
CONCAT() – SQL Server 2012 , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]