1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | CREATE OR REPLACE FUNCTION f_get_param( IN_PARAM IN VARCHAR2, IN_FLAG IN VARCHAR2) RETURN VARCHAR2 IS RESULT VARCHAR2(500); v_leng NUMBER; v_left NUMBER; v_right NUMBER; v_param VARCHAR2(200); v_param1 VARCHAR2(200); BEGION RESULT := ''; v_param:=IN_PARAM; v_leng := LENGTH(v_param); v_left := instr(v_param,in_flag); IF v_left > 0 THEN v_param1 := substr(v_param,v_left,v_leng - v_left +1) v_left := instr(v_param1,':') + 1; v_right := indtr(v_param1,'$'); RESULT := substr(v_param1,v_left,v_right-v_left) END IF; RETURN(RESULT); EXCEPTION WHEN OTHERS THEN RETURN ''; END f_get_param; //数据库赋值格式 f_get_param(v_param,'materialtype:');//器件编码类型 //数据库展示 public string BuildToParams(ListArgs Args) { string params = '$'; if(Args != null) { if(!string.isNotEmpty(Args.MaterailType)) { params = params + 'materialtypes:' + Args.MaterailType + '$'; } } return params; } //Oracle 数据库拓展-多选参数 SELECT instr(',' || '1,2,3,21' || ',',',' || '1' || ',') FROM DUAL SELECT * FROM table_name where instr(',' || list_id || ',',',' || id || ',') > 0 //Oarcle 多条件','隔开查询 select distinct regexp_substr('我爱你','[^.]+',1,rownum) xyz_name From dual connect by rownum <= length('我爱你') - length(replace('我爱你',',')) + 1 |
张兴康 发表于 2016-12-28 16:33
张这么大嘴巴干嘛
张兴康 发表于 2016-12-30 13:47
嘴巴被缝起来了啊?
张兴康 发表于 2017-1-3 13:59
怎么只有一个鼻孔在出气?
欢迎光临 度量快速开发平台-专业、快速的软件定制快开平台 (http://bbs.delit.cn/) | Powered by Discuz! X3.2 |