char 类型的也可以加
v04002 和 v04003 都是char(2)  分布是 月 和 日
如 04 月 12日
'20090912' 是 char(8) 类型的 列

b.v04002+b.v04003 > substring('20090912', 5, 4) and
b.v04002+b.v04003 <= substring('20090922', 5, 4)

当然也可以写成这样子

substring(ymd,5,2) >= '09' and substring(ymd,5,2) <= '09'
                        and substring(ymd,7,2) > '07' and substring(ymd,7,2) <= '25'

posted on 2009-09-27 19:45  秋波渡  阅读(228)  评论(0编辑  收藏  举报