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


Upload Image Close it
Select File

Browse by Tags · View All
sql_server 217
t-sql 211
tsql 116
sqlserver 96
BRH 78
#SQLServer 66
#TSQL 56
SQL Server 34
function 11
SSMS 9

Archive · View All
August 2007 17
August 2010 8
June 2012 7
June 2011 7
November 2007 7
August 2012 6
May 2012 6
November 2011 6
August 2011 6
October 2011 6

Madhivanan's TSQL Blog

PRINT statement and Datetime values

Mar 10 2011 1:31AM by Madhivanan   

PRINT statement is used to return user defined message to the client. However you need to be aware of the return type of the print statement. No matter what the input is, print statement always return data as a varchar datatype (or nvarchar if the input is of nvarchar datatype)

Consider the following code and see the difference

SELECT statement

declare @date datetime
select @date = '20101001'
select  @date 

Result

-----------------------
2010-10-01 00:00:00.000

PRINT statement

declare @date datetime
select @date = '20101001'
print @date 

Result

-----------------------
oct  1 2010 12:00AM

As you see the output returned from the above print statement, date values are converted to varchar compatible to server's language. Now change the language settings and run the same code. Set the server's language to dutch

set language dutch
declare @date datetime
select @date = '20101001'
select  @date 

Result

-----------------------
2010-10-01 00:00:00.000

PRINT statement

declare @date datetime
select @date = '20101001'
print @date 

Result

-----------------------
okt  1 2010 12:00AM

As you see the print statement return month name as okt in dutch language. So be aware of this and use the print statement with care

Tags: t-sql, sql_server, sqlserver, tsql, BRH, #TSQL, #SQLServer, print,


Madhivanan
3 · 39% · 12429
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

1  Comments  

  • Madhivanan, Thank-you so much for sharing this!

    Although a very small point in hindsight, this might give us sleepless nights sometime. It's always better to take care of it from day 01 itself.

    Thank-you!

    Be courteous. Drive responsibly.

    commented on Mar 29 2011 2:41PM
    Nakul Vachhrajani
    4 · 33% · 10575

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]