Uniqualize rows of any table using ora_te

One of the cool ways to use my small template engine for Oracle (ora_te). procedure uniqualize_rows_no_commit( a_table_name in varchar2 ) as v_clob clob; v_te_uniq ty_te; begin v_te_uniq := ty_te.compile_named( q’# delete from {$table_name} where rowid in ( select rowid from ( select rowid , row_number() over ( partition by {%for cur:1|join(‘,’)%}{$column_name}{%endfor%} order by null ) […]

ora_te: v1.0.3 is here

A simple template engine for Oracle ora_te has a new release v1.0.3. IF and FOR constructs are implemented (the Twig way), while old syntax for loops is moved behind syntax proxy. Road map for further development: Filters for uppercase, lowercase and capital case (like in Twig). Partial substitution

ora_te: Road map

Here’s the target for next release. Handle loops and substitute values from cursors. So something like this can be handled. ‘merge into {$dest_table} t1 using {$tmp_table} t2 on (t1.{$join_by} = t2.{$join_by} ) when matched then update set {%1%t1.?1 = t2.?1%\r\n ,|n|?%} delete where t2.status_code = ”D” when not matched then insert( {$dwh_pk} , {%2%t1.{{column_name}} = […]

ora_te: A simple template engine for Oracle

Just started a new project ora_te at GitHub. For now it just implements substitution of placeholders so one could write something like select pk_te.substitute( ‘$1-$2-$3 $1-$2-$4’, pk_te.p( ‘Ob’, ‘la’, ‘di’, ‘dah’ ) ) p from dual; select pk_te.substitute( ‘{$verb} a {$subject}’ , pk_te.m( pk_te.p( ‘verb’, ‘Take’) , pk_te.p( ‘subject’, ‘book’ ) ) ) m from […]