ado中SQL语句的 month()函数出有问题?
Var month1,month2: integer;
...
begin
...
//在ado中,对sql server用
ADoQuery1.Close;
adoquery1.SQL.Clear;
adoQuery1.SQL.ADD('month(销售日期)>=:t1 and month(销售日期)<=:t2');
AdoQuery1.Parameters.ParamByName('t1').Value:=month1;
AdoQuery1.Parameters.ParamByName('t2').Value:=month2;
AdoQuery1.open;
//当 month1,month2取值为1到9时,正常,
//但 month1,month2取值在10以上时,好象就不对了,是怎么回事?