I am novice to teradata and I have a task to convert oracle stored procedure to teradata stored procedure V2R6.2. In oracle procedure I have inner procedures and functions which use normal cursors and cursors with parameters and perform some calculations.
eg: /// an oracle test case procedure
create or replace procedure sample() is cursor cur1(a varchar2) is select stmt; function get_cost(b varchar2) begin select count(1) into y from b; return (y); end; begin for r in cur1('sample') loop x = get_cost('tablename'); end loop;
when i drilled down the reference manuals, there is nothing like cursors with parameters as in oracle and we cannot have user defined functions right away-- we need to write c/c++ to do that.
can some one please give me tips to convert the above procedure into teradata sql Thanks in advance.