plsql - why no data is getting inserted for this stored pl/sql -


i have created following function check whether date exist in valid format.

create or replace function dt_valid(p_dstrng in varchar2,                                     p_dfmt   in varchar2) return boolean   v_dtval date; begin   v_dtval := to_date (p_dstrng, p_dfmt);   return true; exception   when others     return false; end; 

the function called pl/sql procedure fetches metadata information table tmp_to_dest , if field fetches date ( identified column transform_function = 'txt2dtf' ) checks format 'dd-mon-yy' rows column in table.it same column in table temp_med. if format not present row should inserted in data_quality_chk .

create or replace procedure data_quality_check ( id number default null ) x varchar2(4000); begin o in ( select temp_field_name,dest_field_name,transform_function tmp_to_dest ) loop    if o.transform_function = 'text2df'    /// fetches column name metadata table tmp_to_dest , loop through each column check valid date   m in ( select o.temp_field_name temp_field_name temp_columns )      loop     if not dt_valid(m.temp_field_name, 'dd-mon-yy')      execute immediate 'insert data_quality_chk values(x,''1'',''1'',''1'',''1'') ' ;      commit;      end if;       end loop;   end if; end loop; end data_quality_check;  /// fetches column name metadata table tmp_to_dest , loop through each column check valid date 

if execute above procedure neither output displayed not row inserted. doing wrong here?

maybe there mistake in line:

if o.transform_function = 'text2df'  

try change this:

if o.transform_function = 'text2dtf'  

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -