回复 6楼 mywisdom88
非常感谢版主的答复,如何将查询结果输出到一个临时表中(VFP9),我试了一下,结果不对。仅仅最后的代码做了修改。代码如下:
cWhere = ""
if !empty(a值)
cWhere = "between(a值,a下限,a上限)"
endif
if !empty(b值)
cWhere = iif(empty(cWhere),"between(b值,b下限,b上限)", cWhere + " and between(b值,b下限,b上限)")
endif
if !empty(c值)
cWhere = iif(empty(cWhere),"between(c值,c下限,c上限)", cWhere + " and between(c值,c下限,c上限)")
endif
if !empty(cWhere)
cWhere = " where " + cWhere
endif
SELECT * FROM 表名 cWhere into cursor 临时表
thisform.grid1.recordsource="临时表"