select decode(e.Recipeflag_Int,(select count(*) from t_opr_outpatientrecipe a where a.recorddate_dat between to_date('2017-08-03 00:00:00','yyyy-mm-dd hh24:mi:ss')and to_date('2017-08-03 23:59:59','yyyy-mm-dd hh24:mi:ss')and a.recorddate_dat=(select min(recorddate_dat) from t_opr_outpatientrecipe where a.registerid_chr=registerid_chr)=1),1,0)from t_opr_outpatientrecipe ed hh24:mi:ss')and to_date('2017-08-03 23:59:59','yyyy-mm-dd hh24:mi:ss')and a.recorddate_dat=(select min(recorddate_dat) from t_opr_outpatientrecipe where a.registerid_chr=registerid_chr)=1),1,0)from t_opr_outpatientrecipe e一直提示缺失右括号...... Online is not to say that the inside of the decode the select block to add (), where is wrong?
CodePudding user response:
Ed hh24: mi: ss ')What is this??????? Behind your form list
CodePudding user response:
(select count (*) from t_opr_outpatientrecipe where a a.r ecorddate_dat between to_date (' 2017-08-03 00:00:00 ', '- dd yyyy - mm hh24: mi: ss') and to_date (' 23:59:59 2017-08-03 ', '- dd yyyy - mm hh24: mi: ss') and a.r ecorddate_dat=(select min (recorddate_dat) from t_opr_outpatientrecipe where a.r egisterid_chr registerid_chr)==1), 1, 0) from t_opr_outpatientrecipe Ed hh24: mi: ss ') an d to_date (' 23:59:59 2017-08-03 ', '- dd yyyy - mm hh24: mi: ss') and a.r ecorddate_dat=(select min (recorddate_dat) from t_opr_outpatientrecipe where a.r egisterid_chr registerid_chr)==1), 1, 0) from t_opr_outpa