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

Takes Query Plan Analysis and Performance Monitoring to a New Level

Using the TSQL Convert Function

Converting to and from various data types is every day stuff for most of us, things like converting numbers to strings so we can concatenate them. We'll show you a few different examples of using Convert, and we'll look at an unusual result you can get in a couple uncommon situations. Good basic TSQL, stuff it's worth while to master.

Duration:
4 mins 19 secs
Skill Level:
100
Rating:
4.37 out of 5
Publish Date:
December 26, 2010
Using the TSQL Convert 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
Robert Djabarov on 12/27/2010
Could have explained under what circumstances omitting the length specifications for VARCHAR determines predefined length of the resulting variable/field.

Ludwig on 12/27/2010
good job!

viswanathan on 12/27/2010
thanks this video useful for me.

Gil on 12/28/2010
Instead of saying that you don't need to specify the length of a varchar, you should probably say that you don't need to specify the length if the length will be 30 characters or less, because the default length is 30.

kalapala baburao on 12/29/2010
good

Derek on 12/29/2010
Nice things to remember.

Diana Dee on 12/30/2010
(1) varchar with no length specified in CAST and CONVERT has default length 30. In mu opinion, it would have been better if you had said that. (2) I don't know if you had mentioned precision and scale definitions in the past for the decimal data type. In my opinion, it would have been better to say that the default scale of decimal is zero.

Bridget on 1/3/2011
very useful

Lonnie Meinke on 1/3/2011
Would like to see another more in-depth version on errors and how to handle/trouble shoot for different conversions (primarliy varchar to currency or decimal). For example often a conversion to currency will work where a conversion to a decimal(18,6) will fail. Thanks, Lonnie

huruy yohannes on 1/3/2011
Would be nice to look at the executed text while looking at the results in some of the examples. but overall great tutorial as always.

Shellz on 1/3/2011
This video reminds you that it's the details that can take you down. Thank you!

JR on 2/8/2011
Need more about converting dates, striping out time

Maurice Ivory on 2/11/2011
This one was great, I actually learned something!!

Tony Bromirski on 8/1/2011
Short, clear and to the point!



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