1

Simple question, not so simple answer! I have a bunch of dates... how do I remove the middle numbers (which are incorrect) so I just have Week 3, 2011/2012 etc? Thanks!

Reporting_Week_Name
Week 52, 2010/2011/2012
Week 52, 2010/2011/2012
Week 1, 2011/2011/2012
Week 1, 2011/2011/2012
Week 1, 2011/2011/2012
Week 1, 2011/2011/2012
Week 1, 2011/2011/2012
Week 1, 2011/2011/2012
Week 1, 2011/2011/2012
Week 2, 2011/2011/2012
Week 2, 2011/2011/2012
Week 2, 2011/2011/2012
Week 2, 2011/2011/2012
Week 2, 2011/2011/2012
Week 2, 2011/2011/2012
Week 2, 2011/2011/2012
Week 3, 2011/2011/2012
Week 3, 2011/2011/2012
Week 3, 2011/2011/2012
Week 3, 2011/2011/2012
Week 3, 2011/2011/2012
Week 3, 2011/2011/2012
Week 3, 2011/2011/2012
Week 4, 2011/2011/2012
Week 4, 2011/2011/2012
Week 4, 2011/2011/2012
Week 4, 2011/2011/2012
Week 4, 2011/2011/2012
Week 4, 2011/2011/2012
Week 4, 2011/2011/2012
Week 5, 2011/2011/2012
Week 5, 2011/2011/2012
Week 5, 2011/2011/2012
Week 5, 2011/2011/2012
Week 5, 2011/2011/2012
Week 5, 2011/2011/2012
Week 5, 2011/2011/2012
Week 6, 2011/2011/2012
Week 6, 2011/2011/2012
Week 6, 2011/2011/2012
Week 6, 2011/2011/2012
Week 6, 2011/2011/2012
Week 6, 2011/2011/2012
Week 6, 2011/2011/2012
Week 7, 2011/2011/2012
Week 7, 2011/2011/2012
Week 7, 2011/2011/2012
Week 7, 2011/2011/2012
Week 7, 2011/2011/2012
Week 7, 2011/2011/2012
Week 7, 2011/2011/2012
Week 8, 2011/2011/2012
Week 8, 2011/2011/2012
Week 8, 2011/2011/2012
Week 8, 2011/2011/2012
Week 8, 2011/2011/2012
Week 8, 2011/2011/2012
Week 8, 2011/2011/2012
Week 9, 2011/2011/2012
Week 9, 2011/2011/2012
Week 9, 2011/2011/2012
Week 9, 2011/2011/2012
Week 9, 2011/2011/2012
Week 9, 2011/2011/2012
Week 9, 2011/2011/2012
Week 10, 2011/2011/2012
Week 10, 2011/2011/2012
Week 10, 2011/2011/2012
Week 10, 2011/2011/2012
Week 10, 2011/2011/2012
Week 10, 2011/2011/2012
Week 10, 2011/2011/2012
Week 11, 2011/2011/2012
Week 11, 2011/2011/2012
Week 11, 2011/2011/2012
Week 11, 2011/2011/2012
Week 11, 2011/2011/2012
Week 11, 2011/2011/2012
Week 11, 2011/2011/2012
Week 12, 2011/2011/2012
Week 12, 2011/2011/2012
Week 12, 2011/2011/2012
Week 12, 2011/2011/2012
Week 12, 2011/2011/2012
Week 12, 2011/2011/2012
Week 12, 2011/2011/2012
Week 13, 2011/2011/2012
Week 13, 2011/2011/2012
Week 13, 2011/2011/2012
Week 13, 2011/2011/2012
Week 13, 2011/2011/2012
Week 13, 2011/2011/2012
Week 13, 2011/2011/2012
Week 14, 2011/2011/2012
Week 14, 2011/2011/2012
Week 14, 2011/2011/2012
Week 14, 2011/2011/2012
Week 14, 2011/2011/2012
Week 14, 2011/2011/2012
Week 14, 2011/2011/2012
Week 15, 2011/2011/2012
Week 15, 2011/2011/2012
Week 15, 2011/2011/2012
Week 15, 2011/2011/2012
Week 15, 2011/2011/2012
Week 15, 2011/2011/2012
Week 15, 2011/2011/2012
Week 16, 2011/2011/2012
Week 16, 2011/2011/2012
Week 16, 2011/2011/2012
Week 16, 2011/2011/2012
Week 16, 2011/2011/2012
Week 16, 2011/2011/2012
Week 16, 2011/2011/2012
Week 17, 2011/2011/2012
Week 17, 2011/2011/2012
Week 17, 2011/2011/2012
Week 17, 2011/2011/2012
Week 17, 2011/2011/2012
Week 17, 2011/2011/2012
Week 17, 2011/2011/2012
Week 18, 2011/2011/2012
Week 18, 2011/2011/2012
Week 18, 2011/2011/2012
Week 18, 2011/2011/2012
Week 18, 2011/2011/2012
Week 18, 2011/2011/2012
Week 18, 2011/2011/2012
Week 19, 2011/2011/2012
Week 19, 2011/2011/2012
Week 19, 2011/2011/2012
Week 19, 2011/2011/2012
Week 19, 2011/2011/2012
Week 19, 2011/2011/2012
Week 19, 2011/2011/2012
Week 20, 2011/2011/2012
Week 20, 2011/2011/2012
Week 20, 2011/2011/2012
Week 20, 2011/2011/2012
Week 20, 2011/2011/2012
Week 20, 2011/2011/2012
Week 20, 2011/2011/2012
Week 21, 2011/2011/2012
Week 21, 2011/2011/2012
Week 21, 2011/2011/2012
Week 21, 2011/2011/2012
Week 21, 2011/2011/2012
Week 21, 2011/2011/2012
Week 21, 2011/2011/2012
Week 22, 2011/2011/2012
Week 22, 2011/2011/2012
Week 22, 2011/2011/2012
Week 22, 2011/2011/2012
Week 22, 2011/2011/2012
Week 22, 2011/2011/2012
Week 22, 2011/2011/2012
Week 23, 2011/2011/2012
Week 23, 2011/2011/2012
Week 23, 2011/2011/2012
Week 23, 2011/2011/2012
Week 23, 2011/2011/2012
Week 23, 2011/2011/2012
Week 23, 2011/2011/2012
Week 24, 2011/2011/2012
Week 24, 2011/2011/2012
Week 24, 2011/2011/2012
Week 24, 2011/2011/2012
Week 24, 2011/2011/2012
Week 24, 2011/2011/2012
Week 24, 2011/2011/2012
Week 25, 2011/2011/2012
Week 25, 2011/2011/2012
Week 25, 2011/2011/2012
Week 25, 2011/2011/2012
Week 25, 2011/2011/2012
Week 25, 2011/2011/2012
Week 25, 2011/2011/2012
Week 26, 2011/2011/2012
Week 26, 2011/2011/2012
Week 26, 2011/2011/2012
Week 26, 2011/2011/2012
Week 26, 2011/2011/2012
Week 26, 2011/2011/2012
Week 26, 2011/2011/2012
Week 27, 2011/2011/2012
Week 27, 2011/2011/2012
Week 27, 2011/2011/2012
Week 27, 2011/2011/2012
Week 27, 2011/2011/2012
Week 27, 2011/2011/2012
Week 27, 2011/2011/2012
Week 28, 2011/2011/2012
Week 28, 2011/2011/2012
Week 28, 2011/2011/2012
Week 28, 2011/2011/2012
Week 28, 2011/2011/2012
Week 28, 2011/2011/2012
Week 28, 2011/2011/2012
Week 29, 2011/2011/2012
Week 29, 2011/2011/2012
Week 29, 2011/2011/2012
Week 29, 2011/2011/2012
Week 29, 2011/2011/2012
Week 29, 2011/2011/2012
Week 29, 2011/2011/2012
Week 30, 2011/2011/2012
Week 30, 2011/2011/2012
Week 30, 2011/2011/2012
Week 30, 2011/2011/2012
Week 30, 2011/2011/2012
Week 30, 2011/2011/2012
Week 30, 2011/2011/2012
Week 31, 2011/2011/2012
Week 31, 2011/2011/2012
Week 31, 2011/2011/2012
Week 31, 2011/2011/2012
Week 31, 2011/2011/2012
Week 31, 2011/2011/2012
Week 31, 2011/2011/2012
Week 32, 2011/2011/2012
Week 32, 2011/2011/2012
Week 32, 2011/2011/2012
Week 32, 2011/2011/2012
Week 32, 2011/2011/2012
Week 32, 2011/2011/2012
Week 32, 2011/2011/2012
Week 33, 2011/2011/2012
Week 33, 2011/2011/2012
Week 33, 2011/2011/2012
Week 33, 2011/2011/2012
Week 33, 2011/2011/2012
Week 33, 2011/2011/2012
Week 33, 2011/2011/2012
Week 34, 2011/2011/2012
Week 34, 2011/2011/2012
Week 34, 2011/2011/2012
Week 34, 2011/2011/2012
Week 34, 2011/2011/2012
Week 34, 2011/2011/2012
Week 34, 2011/2011/2012
Week 35, 2011/2011/2012
Week 35, 2011/2011/2012
Week 35, 2011/2011/2012
Week 35, 2011/2011/2012
Week 35, 2011/2011/2012
Week 35, 2011/2011/2012
Week 35, 2011/2011/2012
Week 36, 2011/2011/2012
Week 36, 2011/2011/2012
Week 36, 2011/2011/2012
Week 36, 2011/2011/2012
Week 36, 2011/2011/2012
Week 36, 2011/2011/2012
Week 36, 2011/2011/2012
Week 37, 2011/2011/2012
Week 37, 2011/2011/2012
Week 37, 2011/2011/2012
Week 37, 2011/2011/2012
Week 37, 2011/2011/2012
Week 37, 2011/2011/2012
Week 37, 2011/2011/2012
Week 38, 2011/2011/2012
Week 38, 2011/2011/2012
Week 38, 2011/2011/2012
Week 38, 2011/2011/2012
Week 38, 2011/2011/2012
Week 38, 2011/2011/2012
Week 38, 2011/2011/2012
Week 39, 2011/2011/2012
Week 39, 2011/2011/2012
Week 39, 2011/2011/2012
Week 39, 2011/2011/2012
Week 39, 2011/2011/2012
Week 39, 2011/2011/2012
Week 39, 2011/2011/2012
Week 40, 2011/2011/2012
Week 40, 2011/2011/2012
Week 40, 2011/2011/2012
Week 40, 2011/2011/2012
Week 40, 2011/2011/2012
Week 40, 2011/2011/2012
Week 40, 2011/2011/2012
Week 41, 2011/2011/2012
Week 41, 2011/2011/2012
Week 41, 2011/2011/2012
Week 41, 2011/2011/2012
Week 41, 2011/2011/2012
Week 41, 2011/2011/2012
Week 41, 2011/2011/2012
Week 42, 2011/2011/2012
Week 42, 2011/2011/2012
Week 42, 2011/2011/2012
Week 42, 2011/2011/2012
Week 42, 2011/2011/2012
Week 42, 2011/2011/2012
Week 42, 2011/2011/2012
Week 43, 2011/2011/2012
Week 43, 2011/2011/2012
Week 43, 2011/2011/2012
Week 43, 2011/2011/2012
Week 43, 2011/2011/2012
Week 43, 2011/2011/2012
Week 43, 2011/2011/2012
Week 44, 2011/2011/2012
Week 44, 2011/2011/2012
Week 44, 2011/2011/2012
Week 44, 2011/2011/2012
Week 44, 2011/2011/2012
Week 44, 2011/2011/2012
Week 44, 2011/2011/2012
Week 45, 2011/2011/2012
Week 45, 2011/2011/2012
Week 45, 2011/2011/2012
Week 45, 2011/2011/2012
Week 45, 2011/2011/2012
Week 45, 2011/2011/2012
Week 45, 2011/2011/2012
Week 46, 2011/2011/2012
Week 46, 2011/2011/2012
Week 46, 2011/2011/2012
Week 46, 2011/2011/2012
Week 46, 2011/2011/2012
Week 46, 2011/2011/2012
Week 46, 2011/2011/2012
Week 47, 2011/2011/2012
Week 47, 2011/2011/2012
Week 47, 2011/2011/2012
Week 47, 2011/2011/2012
Week 47, 2011/2011/2012
Week 47, 2011/2011/2012
Week 47, 2011/2011/2012
Week 48, 2011/2011/2012
Week 48, 2011/2011/2012
Week 48, 2011/2011/2012
Week 48, 2011/2011/2012
Week 48, 2011/2011/2012
Week 48, 2011/2011/2012
Week 48, 2011/2011/2012
Week 49, 2011/2011/2012
Week 49, 2011/2011/2012
Week 49, 2011/2011/2012
Week 49, 2011/2011/2012
Week 49, 2011/2011/2012
Week 49, 2011/2011/2012
Week 49, 2011/2011/2012
Week 50, 2011/2011/2012
Week 50, 2011/2011/2012
Week 50, 2011/2011/2012
Week 50, 2011/2011/2012
Week 50, 2011/2011/2012
Week 50, 2011/2011/2012
Week 50, 2011/2011/2012
Week 51, 2011/2011/2012
Week 51, 2011/2011/2012
Week 51, 2011/2011/2012
Week 51, 2011/2011/2012
Week 51, 2011/2011/2012
Week 51, 2011/2011/2012
Week 51, 2011/2011/2012
Week 52, 2011/2011/2012
Week 52, 2011/2011/2012
Week 52, 2011/2011/2012
Week 52, 2011/2011/2012
Week 52, 2011/2011/2012
Week 52, 2011/2011/2012
Week 52, 2011/2012/2013
Week 1, 2012/2012/2013

2 Answers 2

4

You can use charindex to find the first / and stuff to remove 5 characters.

select stuff(Reporting_Week_Name, charindex('/', Reporting_Week_Name), 5, '')

Data explorer

1
  • excellent. very simple and elegant. thanks!
    – jhowe
    Feb 25, 2015 at 14:15
1
DECLARE 
@vcVar AS VARCHAR(500) = 'Week 3, 2011/2011/2012'

SELECT STUFF(@vcVAR , CHARINDEX('/',@vcVar) ,5,'')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.