SQL与PL/SQL查询时间问题
string ls_datelong,ll_amout
ls_date=ProfileString(afile,"In_time","time","")
select sum(A.amout)
into : ll_amout
from A
where A.str_date >=to_date(ls_date,"yyyy-mm-dd hh24:mi:ss") and A.str_date<=(sysdate,"yyyy-mm-dd hh24:mi:ss")
这样是不可以查出的,请问怎么写才对??ls_date是否还要转换?这是PL/SQL,SQL又怎么写?因为我有两个事务。
ls_date在ini得到是‘2012-10-20 00:00:00’
[解决办法]
string ls_datelong,ll_amout
ls_date=ProfileString(afile,"In_time","time","")
select sum(A.amout)
into : ll_amout
from A
where A.str_date >=to_date(:ls_date,"yyyy-mm-dd hh24:mi:ss") and A.str_date<=(sysdate,"yyyy-mm-dd hh24:mi:ss")