select /*+index_ffs(tn codeË÷ÒýÃû)*/ count(1) from t_tablename tn where tn.code like dep.depcode || '%' and round(to_number(tn.date1-tn.date2)* 1440) > 10 and tn.date1 < to_date('2009-12-30', 'yyyy-MM-dd') + 1 and tn.date1>= to_date('2009-12-1', 'yyyy-MM-dd')
ÎÒÔÚdate1ºÍcode2¸ö×Ö¶ÎÉ϶¼½¨ÓÐË÷Òý£¬¿ÉΪʲô£¬ËûÖ»×ßdate1Ë÷Òý£¬²»×ßcodeµÄË÷ÒýÄØ¡£ Èç¹ûÎÒ°Ñround(to_number(tn.date1-tn.date2)* 1440) > 10£¬Õâ¸öÌõ¼þ¸øÈ¥µô£¬Ëû¾Í»á×ßcodeºÍdate1Ë÷Òý¡£ tn.code like dep.depcode || '%'ÎÒÔÚд²âÊÔÓï¾äµÄʱºò£¬ÊÇÓÃtn.code like ¡®xx%¡¯µ«ÊÇÒ²²»ÐС£
ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡ ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exist ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡