Wednesday, June 08, 2005

 

T-SQL funs from community sites.

I came across of this T-SQL code from a SQL Community site (SQLBang / SQLCon), I wonder... how to store tailed embeded space in a string.

----------------Begining of the script ------------
declare @myStr varchar(10)
declare @urStr varchar(10)

set @myStr = 'String'
set @urStr = 'String '

if @myStr = @urStr
begin
print 'Equal'
end
else
begin
print 'Not Equal'
end

----------------End of the script ------------

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?