Sunday, December 19, 2010

SQL Server SUBSTRING giving me incorrect results

I get incorrect result when i try to do a substring within a stored proc,but the same thing if i try it in a query window gives me proper results.

declare @FinalCol_List as varchar(100)
Set @FinalCol_List= '11,22,33,bb,'
print @FinalCol_List
IF LEN(@FinalCol_List) > 0
SET @FinalCol_List = SUBSTRING(@FinalCol_List, 1, LEN(@FinalCol_List) - 1)

print @FinalCol_List

5 comments:

  1. The belt mаkeѕ use of gеl pаԁs postionеԁ mοrе than thе centeг abdοminals anԁ the outside oblіques.



    Here is my web site; flex belt
    my page > Www.prnewswire.Com

    ReplyDelete
  2. Share Market Investment made profitable by SHRISTOCKTIPS- Get NSE/BSE Tips via SMS and Yahoo Messenger. We give daily stock market tips for future and cash segments.Epic Research

    ReplyDelete

Express you views