0
回答
oracle存储过程中用%rowtype取出值做参数有问题
终于搞明白,存储TCO原来是这样算的>>>   

开始我是用下面的方法做的,但是这样总是取不到数据。

cursor c_ftp is select SENDPHONE,count(*) from FTP_MSG_CONTENT where MSGCONTENT  like mission_record.feature_head||'%'|| mission_record.feature_tail and  SENDPHONE!= mission_record.access_no group by sendPhone;
BEGIN
 for mission_record in ( select *  from mission where MIS_STATUS='1' and MIS_TYPE='1')
 loop
  open c_ftp ;
  loop
    FETCH c_ftp into v_sendphone, v_sendphonecount;  exit when c_ftp%notfound;

后面我将mission_record的数据取出来放入变量,如下,就可以取出数据。这个是不是因为%rowtype存的数据没有存储数据类型。有没有什么解决方法??

cursor c_ftp is select SENDPHONE,count(*) from FTP_MSG_CONTENT where MSGCONTENT like v_head||'%'|| v_tail  and  SENDPHONE != v_access group by sendPhone;
BEGIN
 loop
  v_head:=mission_record.FEATURE_HEAD;
  v_tail:=mission_record.FEATURE_TAIL;
  v_access:=mission_record.access_no;
  open c_ftp ;
  loop
    FETCH c_ftp into v_sendphone, v_sendphonecount;
    exit when c_ftp%notfound;



举报
风声没
发帖于3年前 0回/828阅
顶部