SQLTeam.com | Weblogs | Forums

Remove first 4 characters from a column


#1

How can I remove first 4 characters from a column on the result ? Can I use distinct for this column ?


#2

SELECT STUFF(YourColumn,1,4,'') FROM YOURTABLE

You can use distinct. The distinctness (or is it distinctivity :smile: ) will be based on result of the STUFF function - i.e, the values with the first 4 characters removed.


#3

Love it . . Thank you . . :smile:


#4

I am using the same expression with x.column name from table name 'x'. Not seems to be working
Any suggestions ?


#5

Error ? or does not remove ?

Show us your query


#6

Well .. It is working, Sorry about that (my bad)