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

9 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
  3. The given updates about share market are helpful in trading and you can get more financial advices from Dollar Advisory at Trading Services

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

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

    ReplyDelete
  6. Regular sets a option to make a large system in the market to trade with a position.



    Best Equity Intraday tips
    Free Commodity Trading Tips

    ReplyDelete

Express you views