What else have we been up to?
Oracle Call Interface Binding to Erlang
N = “447956123456”,
F=fun() ->
case oci:exec(“select name, balance from cust where telno = :e”, [N]) of
[{Name, Amount}] ->
A1 = Amount - 10.0,
oci:exec(“update cust set balance = :e where telno = :e”,[A1, N])
[] ->
oci:abort(“Customer not found”)
end,
oci:transaction(Connection, F).