strSQL="select * from TTest where regdate>='2001-08-31 00:00:00'"
or
strSQL="select * from TTest where To_Date(regdate,'yyyy-mm--dd')>='2001-08-31'"
都查不出来,请各位赐教!越快越好!谢谢!
6 个解决方案
#1
應該是:
strSQL="select * from TTest where To_char(regdate,'yyyy-mm--dd')>='2001-08-31'"
strSQL="select * from TTest where To_char(regdate,'yyyy-mm--dd')>='2001-08-31'"
#2
这样写是最标准的:
select *
from TTest
where trunc(regdate) >= '31-AUG-01'
select *
from TTest
where trunc(regdate) >= '31-AUG-01'
#3
楼上的正确
或者:
select * from TTest where trunc(regdate) >= To_char('2001-08-31','yyyy-mm--dd');
或者:
select * from TTest where trunc(regdate) >= To_char('2001-08-31','yyyy-mm--dd');
#4
select * from ttest where trunc(regdate) >= to_date('2001.08.31','yyyy.mm.dd');
#5
select * from TTest where regdate>=To_Date('2001-08-31','yyyy--mm--dd')
#6
我看了第二位和第三位的回答,在中午已经解决了问题,本应该这两位应该每人得10分,但考虑最后两位的参与,给个参与分吧,每人给2分,第二位和第三位每人得8分,谢谢大家帮忙!
#1
應該是:
strSQL="select * from TTest where To_char(regdate,'yyyy-mm--dd')>='2001-08-31'"
strSQL="select * from TTest where To_char(regdate,'yyyy-mm--dd')>='2001-08-31'"
#2
这样写是最标准的:
select *
from TTest
where trunc(regdate) >= '31-AUG-01'
select *
from TTest
where trunc(regdate) >= '31-AUG-01'
#3
楼上的正确
或者:
select * from TTest where trunc(regdate) >= To_char('2001-08-31','yyyy-mm--dd');
或者:
select * from TTest where trunc(regdate) >= To_char('2001-08-31','yyyy-mm--dd');
#4
select * from ttest where trunc(regdate) >= to_date('2001.08.31','yyyy.mm.dd');
#5
select * from TTest where regdate>=To_Date('2001-08-31','yyyy--mm--dd')
#6
我看了第二位和第三位的回答,在中午已经解决了问题,本应该这两位应该每人得10分,但考虑最后两位的参与,给个参与分吧,每人给2分,第二位和第三位每人得8分,谢谢大家帮忙!