日期:2014-05-17 浏览次数:20828 次
FOR r IN (SELECT 'hello' title, mobile,'还有'||yhnumber||'个工单需要处理。' message FROM USERS, (SELECT COUNT(yhid) yhnumber,userid,wm_concat(yhid) yhid FROM yh_tips WHERE ISclosed ='0' AND emailtime <= SYSDATE GROUP BY userid) T WHERE users.Userid = t.userid AND length(mobile) = 11) LOOP insert into sm_info@sms(catlog,mobilenum,message) VALUES(r.title,r.mobile,r.message); END LOOP