How to chop off X number of characters across multiple records? Hello all!
I have a field that contains geographical locations in the city-state format:


Boston, MA
Los Angeles, CA
Helena, MT
...


The field spans for some 230 records. My task is to chop off the four final characters in each record. How do I go about it? Any ideas?
Thank you!
DECLARE @tab TABLE(statename VARCHAR(20))
INSERT INTO @tab
(
      statename
)
select 'Boston, MA' UNION ALL
select 'Los Angeles, CA' UNION ALL
select 'Helena, MT' 


SELECT SUBSTRING(statename,0,LEN(statename)-3) FROM @tab t

SELECT LEFT(statename,LEN(statename)-4)FROM @tab t