SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Idera SQL Check

Using the QUOTENAME Function

QUOTENAME does much what you would expect, wraps some text with quotes. Or single quotes. Or brackets! We'll explore QUOTENAME and wrap up with a reminder that we can always do old fashioned string concatenation to get the same result. One of the many TSQL string functions, make sure you know what it can - and can't - do.

Duration:
3 mins 5 secs
Skill Level:
100
Rating:
4.18 out of 5
Publish Date:
October 31, 2010
Using the QUOTENAME Function You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Andy Warren
Andy Warren is a software trainer focusing on SQL Server, a member of the PASS Board of Directors, and a principal in this site - SQLShare.com.

References



Comments
kalapala baburao on 11/1/2010
ok

kalapala baburao on 11/1/2010
ok

Kamen Angelov on 11/1/2010
Will be good to include allowed characters for second parameter (quote delimiters). QUOTENAME recognizes [] () {} <> pairs and single delimiters ' " and ` For any other character the function returns NULL value. By example QUOTENAME('andy', '`') returns `andy` , but QUOTENAME('andy', '*'), QUOTENAME('andy', 'C') and QUOTENAME('andy', NULL) returns NULL.

Will Casey on 11/1/2010
very clear

Sarfaraz Ahmed on 11/1/2010
Very interesting

9C2EEBD5EA on 11/1/2010
Audio is a bit fuzzy

David on 11/1/2010
Good video, but somewhat worthless function

Kris Robinett on 11/1/2010
Very well explained - don't know how often I will use this funtion, but I understand it.

Sam Schafer on 11/1/2010
Consistently good information. Thank you, Andy.

Jack Pines on 11/1/2010
Just noticed that you increased the size of the output. Thanks, Andy, for your consistently great presentations and for responding to your audience so well.

Mark Hathaway on 11/1/2010
It's nice to see the more obsure functions explained.

Bridget on 11/1/2010
Like the font size in the results pane now. Thanks.

Aruna on 11/1/2010
Learned something new today. There are lot of new little little tricks in 2008 and I am just getting around to learn them.

Alexander on 11/1/2010
a good one

Peter Voutov on 11/1/2010
didn't really explain the reason why you'd use this function over straight concatenation. with the 128 character limit it seems like a function that's not very useful. i imagine it performs much faster than manual string concatenation, which would be a reason to use it in a large select statement that needed quoted columns (e.g. bulk exporting of data?)

Gil on 11/1/2010
I think it would have been useful to show that QuoteName also handles embedded closing characters by "doubling them up". So quotename('a]b',']') returns: [a]]b] and quotename('a"b",'"') returns: "a""b"

GParvathesam on 11/1/2010
-

Russell Tye on 11/1/2010
This was very clear and understandable.

Santosh Singh on 11/2/2010
nothing great about this function

kalapala baburao on 11/2/2010
ok

Don Weigend on 11/2/2010
I really enjoy these short and to the point videos. I like the format of just explaining how to use one thing at a time. Over time it helps to build a solid knowledge foundation. Thanks for doing these!

Kenneth Wymore on 11/2/2010
Good explanation of a function that I have never used.

Dawit on 11/2/2010
Thanks, it is very useful

Ed K on 12/29/2010
I know you want these short, but you ignored the primary benefit of quotename, ie the handling of imbeded quotes DECLARE @test VARCHAR(255) SET @test = 'Ed''s data' SELECT @test select QUOTENAME(@test,'''') SELECT '''' + @test + '''' the last two do NOT give the same result

Ludwig on 1/12/2011
great



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions