关于一条where 语句的问题(10分)

  • 主题发起人 主题发起人 BBQOLDCAT
  • 开始时间 开始时间
B

BBQOLDCAT

Unregistered / Unconfirmed
GUEST, unregistred user!
有一个数据表,要求过滤出第一天的 GLJ 为 a ,RQ为b ,RJ为 8-24之间的数 以及 第二天的GLD为1 ,RJ为
b,RJ为2-6之间的数, 请问一下where 语句怎么写?特急,谢谢各位。
b为第一天的日期,C为第二天的日期
代码:
query1.databasename:='D:/数据库';
           query1.sql.Clear ;
           query1.sql.add('select * from  运行日报.dbf');
           query1.sql.add('where GLH=:a and ((RQ=:b and   ?? )or (RQ=:c and ?? ))');
           .
.
.
.
 
where (RQ=b and GLJ=a and (RJ between 8 and 24)) or
(RQ=C and GLD=1 and RJ=b and (RJ between 2 and 6))
 
接受答案了.
 
后退
顶部