﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / T-SQL  / Select Command while dropping first 2 characters in the column / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 08:39:53 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Select Command while dropping first 2 characters in the column</title><link>http://www.sqlservercentral.com/Forums/Topic682549-8-1.aspx</link><description>You can use the STUFF or SUBSTRING functions as well as the RIGHT function. The SUBSTRING function version is likely to be the fastest, followed by the RIGHT version then the STUFF version.[code]DECLARE @value varchar(20)SELECT @value = 'ks105'SELECT STUFF(@value, 1, 2, '') AS [Stuff], 	SUBSTRING(@value, 3, 18) AS [Substring], 	RIGHT(@value, LEN(@value) - 2) AS [Right][/code]</description><pubDate>Tue, 24 Mar 2009 11:46:31 GMT</pubDate><dc:creator>andrewd.smith</dc:creator></item><item><title>RE: Select Command while dropping first 2 characters in the column</title><link>http://www.sqlservercentral.com/Forums/Topic682549-8-1.aspx</link><description>Lookup the RIGHT function in Books Online. To get the results you want, you may need to combine it with LEN to get all the string except the first two characters.</description><pubDate>Tue, 24 Mar 2009 10:23:44 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Select Command while dropping first 2 characters in the column</title><link>http://www.sqlservercentral.com/Forums/Topic682549-8-1.aspx</link><description>I am looking for a solution to a problem.  I can't quite find the command I am looking for.  I want to select from a column where the items in the column are like ks105ks103ks106and so onI want my results to produce the 105103106 and so on.I want my select command to drop the first 2 characters in that column when displaying the results.  I do not want to modify the information in that table just want my select to display differently.Thanks in advanceRichtoss</description><pubDate>Tue, 24 Mar 2009 10:19:24 GMT</pubDate><dc:creator>RICHTER-311234</dc:creator></item></channel></rss>