To format your date as APR-06, you can do the following:
SELECT REPLACE(RIGHT(CONVERT(VARC
This was taken from the following link:
http://www.sql-server-help
To subtract one month, you will use the DATEADD date function. You can refer to question #17 in the following link:
http://www.sql-server-help
Main Topics
Browse All Topics





by: bruintjePosted on 2006-04-28 at 13:18:03ID: 16565236
Hello fusionfx2000,
you could use something like
SELECT UPPER(CONVERT(CHAR(3), DATEADD(month, -1, INSERT_DATE) , 107)) + '-' + CAST(YEAR(INSERT_DATE) AS CHAR)
hope this helps a bit
bruintje