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


  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

  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

  3. The given updates about share market are helpful in trading and you can get more financial advices from Dollar Advisory at Trading Services

  4. This is good content blog keep it up; you can also search at TradeIndia Research

  5. Best recommendations on stock market you can get here.
    Trade India Research

  6. I am happy to find so many useful information here in the post,thanks for sharing.
    2 Days Free Research Advisory Tips


Express you views