Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Display 2 months previous to the input

$
0
0

I need to update the column with the following value, what is the best way to do this. I tried using a case statement with concatenate (+) but when i tried to concatenate, the value gets summed up. I am using SQL Server 2008

Actual Value            Update to

201401                    201311

201402                    201312

201403                    201401

201404                    201402

201405                   201403

.....

201501                  201411

201502                  201412


Sarvan


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>