select * from 表 where date= inttostr(year)+inttostr(month)
SELECT * FROM tb WHERE [date]=RTRIM(CAST( year AS CHAR))+RTRIM(CAST( month AS CHAR))
select * from tb where convert(char(6),[date])=convert(char(4),year)+convert(char(2),month)
add('select * from tablename where date='''+year+month+'''');还可以再弄个变量 temp:=year+month; add('select * from tablename where date='''+temp+'''');不过日期型的不都是像2010-11-01这种吗?
s:='select * from t where year(date)=2012 and month(date)=12'
temp:=year+month;
add('select * from tablename where date='''+temp+'''');不过日期型的不都是像2010-11-01这种吗?