create function tq84_func(op varchar2, num1 in number, num2 in number) return number is
begin
if op = 'plus' then return num1 + num2; end if;
if op = 'minus' then return num1 - num2; end if;
if op = 'mult' then return num1 * num2; end if;
if op = 'div' then return num1 / num2; end if;
return 0;
end tq84_func;
/
options(skip=1)
load data
infile 'data.csv'
insert
into table tq84_sql_loader_10
fields
terminated by ','
optionally enclosed by '"'
(
id,
op boundfiller,
num1 boundfiller,
num2 boundfiller,
result "tq84_func(:op, :num1, :num2)"
)