ฉันพยายามจะ migrate นี้ลงโทษภาษา sql อกจากลวดลาย sybasestencils เพื่อสิทธิ์แต่ผมไม่ตอนนี้ยังต้องดำเนิ
dateadd
แล้ว datepart
.
select @v_date = convert(char,convert(char(4),datepart(year, dateadd(month, -13, getdate()))) + "/" +
right(( "00" + convert(varchar(2), datepart(month, dateadd(month, -13, getdate())))) , 2) + "/01", 112)
ฉันต้องค้นหาแล้วรู้จักใช้สิทธิ์ interval
แต่ฉันยังไม่เข้าใจว่าทำยังไง