抛砖引玉
fieldbyname('a').asstring:=svalue;
ivalue:=strtoint(svalue);
close;
sql.clear;
sql.add(select * from tablename where a>=min and a<=max);
open;

解决方案 »

  1.   

    又一个模糊查询的问题
    以A字段中任何位置有 edit.text 的值为条件,查询所有字段的内容,请通过query+sql+paradox数据库如何实现?
      

  2.   

    sql.add('select * from tablename where a>='+strtoint(edit.text)+' and a<=max');
      

  3.   

    to xyzguan(不说):
    我的低2个问题与第1个问题无关的,就是说 以A字段中任何位置有 edit.text 的值为条件,查询所有字段的内容,不涉及到最大最小值的问题
      

  4.   

    'select * from tn where a like %'+eidt.text+'%'
      

  5.   

     'select a from atable where a like '+''''+'%'+edit1.text+'%'+'''';
      

  6.   

    一个关于sql模糊查询的问题
    A字段里存放的是字符型记录内容为 010917 代表日期2001-09-17.
    edit1.text 和 edit2.text 里输入的格式跟A字段的格式相同,
    请问在paradox中如何用sql查询以A字段介于edit1 和edit2 两个日期为条件进行查询
      

  7.   

    val:=strtoint(Form5.FlatEdit3.Text);
    query1.Close;
    query1.sql.clear;
    query1.sql.add('select * from table where cast(field as int)=:vas');
    query1.ParamByName('vas').AsInteger:=val;
    query1.Active:=true;
    以上的代码错在哪里,为何不能得到正确查询结果