Output Parameters

Help
2010-12-22
2013-04-16
  • Dirk Hoffmann
    Dirk Hoffmann
    2010-12-22

    Hi,

    can someone please tell me how to bind/fetch output parameters/return values of stored procedures/functions and how to format the sql string passed to sqlparse?

    Thanks and regards,
    Dirk

     
  • Dirk Hoffmann
    Dirk Hoffmann
    2011-01-13

    Meanwhile I managed that with the help from a member of another forum.

    It goes like so:

      set call
      set sql "
      begin
      TEST_PACKAGE.HELLO_WORLD_I_O(:in, :out);
      end;
      "

      oraplexec $call $sql :in World :out {}

      orafetch $call -datavariable row
      set cols

      foreach col $cols value $row {
        puts "$col = $value"
      }

      oraclose $call