首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

oracle存储过程一

2013-03-26 
oracle存储过程1CREATE OR REPLACE FUNCTION F_OBTAIN_FTP_ATTRVALUE (apsi_record_id IN VARCHAR2)RETURN

oracle存储过程1

CREATE OR REPLACE FUNCTION F_OBTAIN_FTP_ATTRVALUE (apsi_record_id IN VARCHAR2)   RETURN VARCHAR2IS   attributevalue   VARCHAR2 (4000);   CURSOR cur   IS      SELECT attribute_value        FROM t_apsi_prod_attr_record       WHERE apsi_prod_record_id = apsi_record_id         AND attribute_value IS NOT NULL;BEGIN   attributevalue := ' ';   FOR c IN cur   LOOP      --if(attributevalue='') then      -- dbms_output.put_line('none^^');      -- end if;      --dbms_output.put_line('begin^^'||attributevalue);      -- dbms_output.put_line('c.ATTRIBUTE_VALUE'||c.ATTRIBUTE_VALUE);      IF (attributevalue = ' ')      THEN         attributevalue := c.attribute_value;         DBMS_OUTPUT.put_line ('begin attributevalue^^' || attributevalue);      ELSE         attributevalue := attributevalue || '|' || c.attribute_value;         DBMS_OUTPUT.put_line ('end attributevalue^^' || attributevalue);      END IF;   END LOOP;   RETURN attributevalue;END;

我的异常网推荐解决方案:oracle存储过程,http://www.myexception.cn/oracle-develop/177537.html

热点排行