بتاريخ: 2 يونيو 201610 سنة comment_275362 السلامم عليكم عند البحث في عدة حقول أستعمل ما يلي: FUNCTION close_w RETURN varchar ISx varchar2(500);y varchar2(50);t varchar2(50);m varchar2(50);r varchar2(50);g varchar2(50);s varchar2(100);BEGINif :dir is not null then x:=' and cod_mr0 in(select cod_mr from etat_mr where cod_doss=:global.cod_doss and cod_dir=:dir)';end if; if :prj is not null then y:=' and cod_mr0=:prj';end if;if :COD_STR is not null then t:=' and cod_cli=:COD_STR';end if;if :contrat is not null then m:=' and cod_mr=:contrat';end if;if :TYP in('B','C') then r:=' and nat=:TYP'; else m:=null; end if;if :num_etat<>'AL' then g:=' and etat_mr=:num_etat';else g:=null;end if;if :d1 is not null and :d2 is not null then s:=' and dat_mr between :d1 and :d2';else return null; end if;return s||x||y||t||m||r||g;END;PROCEDURE exec ISconditions varchar2(2000);BEGINconditions:=close_w; set_block_property('STR_CMMARCHE',default_where,'cod_doss=:global.cod_doss'||conditions);go_block('STR_CMMARCHE');execute_query;END; هل هنالك طريقه أكثر فعالية شكرا مسبقا fiche_fmb_exemple.rar تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.