C cdl Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #1 有一Paradox型表,其中含有两个日期字段(Date型): 入会日期和退会日期,现在要查出(退会日期-入会日期)大于 两年六个月的所有记录,该如何写SELECT语句。
品 品雪 Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #2 select * from TableName where (Year(Date1)-Year(Date2)>2) or ((Year(Date1)-Year(Date2)=2 and Month(Date1)-Month(Date2)>=6))
select * from TableName where (Year(Date1)-Year(Date2)>2) or ((Year(Date1)-Year(Date2)=2 and Month(Date1)-Month(Date2)>=6))
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #3 select * from tbl_name where date2-date1>913 913是2年6个月的天数
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #4 select * from tbl_name where date2-date1>913 913是2年6个月的天数 如果你用的是bde,那就有用,如果用的是odbc之类,我没有试验,不知道有没有用
M mmtiger Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #6 select *from tbl_name where date2-date1>913
H Hexi Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #7 select * from tbl_name where months_between(InDate, OutDate)>6;
H Hexi Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #8 select * from tbl_name where months_between(InDate, OutDate)>30;
W whpjyj Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-28 #9 select * from dbase where date2-date1>两年六个月的天数就可以了啊