获得价格区间
--获得价格区间-- CREATE OR REPLACE function WANFO. fn_GetPriceArea ( v_dj number ) return varchar2 is v_jgqj varchar2( 50); SQL_GETPRICEAREA varchar2( 2000); begin SQL_GETPRICEAREA:='SELECT flag FROM JGQJB WHERE ZXJE <= ''' ||v_dj ||''' AND ZDJE > '''||v_dj|| ''' '; execute immediate SQL_GETPRICEAREA into v_jgqj;--执行oracle 方法 if v_jgqj is null or v_jgqj ='' then ---判读返回值是否为空 begin v_jgqj :=0; end; end if; return v_jgqj; exception when others then dbms_output.put_line( 'error'); return -1 ; end fn_GetPriceArea ; /