On Wed, 12 Jan 2000, Nemeth Miklos wrote:
From: Jim Cain
All,
The "begin procedure (x, y, ..); end;" syntax works for procedures okay, but how do I call a function? The typical quick & dirty way in sqlplus is
variable x number -- or whatever begin :x := function (a, b, ...); end;
This function actually does updating, so I can't use the pragmas to make it acceptable in a select.
"begin :x := function(:a,:b); end;"
where :x, :a and :b are SQL bind variables. This is OCI's syntax. I suppose DCOracle accepts this syntax. You may use literals instead of :a or :b if they are IN arguments.
Yes I tried that: begin :new_id := contact_maint.insert_person ( <dtml-sqlvar first_name type=string>, <dtml-sqlvar middle_name type=nb optional>, <dtml-sqlvar maiden_name type=nb optional>, <dtml-sqlvar last_name type=string> ); end; But I get an OCI error: "ORA-01008: not all variables bound". How do I declare new_id?