关于PB9.0中setfilter()函数的双条件参数书写问题

来源:互联网 发布:便宜的淘宝cosplay店铺 编辑:程序博客网 时间:2024/04/30 09:35
 

string condition,que
//---------------------
string current_account,condition2
select account
into :current_account
from identity_store
;
//---------------------
que="60"

condition="(score <  "+que+")" +"and (sno='"+current_account+"')"

//condition="(score < que )  and (sno=current_account)"  //这种写法是错误的

dw_1.setfilter(condition)
dw_1.Filter()
dw_1.setfocus()
dw_1.setredraw(true)

dw_1.retrieve()

 

代码作用:

根据sno=current_account以及score<60 过滤出 当前学生 不及格课程 的元组

 

注意几点

1.书写双条件时需要使用括号( ) 将每对条件括起来

2.使用and

3.注意双引号 单引号 加号 的使用