1

编辑更多信息:这是基本想法:

Select 
    ID,
    Site,
    Pay,
    Code
FROM STAFF
    WHERE CASE
    When 1/1/2013 < CURDATE() < 3/1/2013 then Staff."Code" in (1,2,3)
    When 3/1/2013 < CURDATE() < 5/1/2012 then Staff."Code" in (2,3,4)
    END

我几乎从不使用 Progress DB,因此我们将不胜感激。谢谢你,

4

1 回答 1

2

你的意思是这样的吗?

WHERE
    (CURDATE() BETWEEN 1/1/2013 AND 3/1/2013 AND Staff."Code" IN (1,2,3)) OR
    (CURDATE() BETWEEN 3/1/2013 AND 5/1/2013 AND Staff."Code" IN (2,3,4))
于 2012-12-28T22:05:33.047 回答