S stoymigo Senior Member Joined Dec 11, 2008 Messages 975 Reaction score 26 Jul 22, 2013 #1 I created a sql-scalar function, but you can copy&paste the code below because it does the same: Code: Declare @Varchie as Varchar Set @Varchie = '51' Select @Varchie This returns 5, why not 51? Thx
I created a sql-scalar function, but you can copy&paste the code below because it does the same: Code: Declare @Varchie as Varchar Set @Varchie = '51' Select @Varchie This returns 5, why not 51? Thx
S stoymigo Senior Member Joined Dec 11, 2008 Messages 975 Reaction score 26 Jul 22, 2013 #2 Ok, someone told me that Varchar is same as Varchar(1), so I made it Varchar(50) and it works.
D dabean Expert Member Joined Feb 24, 2004 Messages 2,368 Reaction score 1,140 Jul 22, 2013 #3 You need to set the size of the variable. Code: Declare @Varchie as Varchar(2) Set @Varchie = '51' Select @Varchie Edit: Glad you're sorted.
You need to set the size of the variable. Code: Declare @Varchie as Varchar(2) Set @Varchie = '51' Select @Varchie Edit: Glad you're sorted.