2014-01-09 55 views
-1

我有这个问题。选择和计数

select * 
from contract_detail 
where contract=264127 
and StartDate >='2014-01-13'; 

我想从合同no.264127到具体日期2014-01-13以后选择具体合同到264221?

回答

0

尝试

select * from contract_detail where contract >= 264127 and contract <= 264221 and StartDate >='2014-01-13'; 
+0

它没有工作。我只需要查看合同264127至264221和日期如上所述。它还向我显示旧数据/合同 – user3179264

+0

select * from contract_detail where contract> = 264127 and contract <264221 and StartDate> ='2014-01-13';我删除了=号。现在我可以看到他们。谢谢! – user3179264

+0

很高兴你有你想要的。只是你知道,<264221不包括合同#264221的合同。希望这是你的意图吗? –