dimanche 1 mars 2015

Change 2 values in a sting

I have the following string 2014/15 passed as a parameter to my procedure and I need to increment the 4 and 5 by 1 so I end up with 2015/16.


Obviously the string is a VARCHAR so I can't use any normal arithmetic functions, nor DATEADD. The parameter must be passed in as is and I must derive a year above and a year below as well as using the parameter.


To simplify, if you feed in 2014/15 then in my SP I will need to use 2013/14, 2014/15 and 2015/16 in various parts or the SP all derived from that 1 string.


Aucun commentaire:

Enregistrer un commentaire