Saturday, October 20, 2012

Get String from stating to second last index in sql server

Declare summary varchar(50)
@Summary="sanjay,raju,chirag,"

I want to remove , from last index,i do this as bel
ow :


Select @Summary=SUBSTRING(@Summary,0,len(@Summary))
select @Summary

Result :


sanjay,raju,chirag

If you are searching life partner. your searching end with kpmarriage.com. now kpmarriage.com offer free matrimonial website which offer free message, free chat, free view contact information. so register here : kpmarriage.com- Free matrimonial website

Related Posts:

  • SQL RIGHT JOIN SQL RIGHT JOIN Keyword The RIGHT JOIN keyword returns all the rows from the right table (table_name2), even if there are no matches in the left tab… Read More
  • date function sql server Question  1 :  How to get current date time in sql server? Ans :           &nbs… Read More
  • date time format in sql server Question  1 :  How to get current date time in sql server? Ans :           &nbs… Read More
  • SQL FULL JOIN SQL FULL JOIN Keyword The FULL JOIN keyword return rows when there is a match in one of the tables. SQL FULL JOIN Syntax SELECT column_name(s) FR… Read More
  • REPLACE Function in sql server REPLACE  replaces part of a text string, based on the number of characters you specify, with a different text string. Syntax : REPLACE(… Read More

0 comments:

Post a Comment