Substract 1 month to update table SQL Server
I need to update all the issuedat
(date field) to be less than one month from the column paidat
(date field)
ex:
if paidat = 01/02/2011 then issuedat should开发者_运维知识库 = 01/01/2011
UPDATE invoices SET invoices.issuedat = ????
UPDATE invoices SET invoices.issuedat = dateadd(MM,-1,paidat)
精彩评论