سؤال

I'm working on a query from en Fox Pro Database. My problem is to find out which is the way to extract only 1 year/ 12 months from a Date. This is my structure (simpleform):

SELECT * FROM table WHERE mydate = date()-interval(12,month).

MSQuery is responding with: Column month not found.

هل كانت مفيدة؟

المحلول

Select * from table where between(mydate, gomonth(mydate, -12), mydate)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top