我遇到一个问题搞不出来:现在要输入3个参数查询,在SQL中输入如下: 
select * from bom_mstr
where :a :b :c 
运行时候报错(第二行@p2附近有语法错误)不知该如何更改?

解决方案 »

  1.   

    select * from bomm_mstr
    where column1=:a and column2=:b and column3=:c
      

  2.   

    同意yzykjh(多米诺骨牌)的代码。
      

  3.   

    select * from bom_mstr
    where :a and :b and :c
      

  4.   

    TO ALL:
        我的参数是这样的,第一个是列,第二个是'='或'like',第三个是值.
       比如   select * from bom_mstr
              where bom_fxdm = 'f001'
       上面的解答好象不行.
      

  5.   

    var
      sqlstr: string;
    begin
     sqlstr:=参数1+参数2+参数3;
     aq.sql.str:='select * from bom_mstr where '+sqlstr;End;
    如:
    sqlstr:='f001'+'='+'20';