Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Not getting output on calling Stored Procedure. #122

Open
@tej1996

Description

I tried to call my SP using callproc method and by passing my inputs and output parameters.
The procedure ran successfully but the output variable is empty (u'').

So, I went to the discussion on official page and found a simple code snippet and even that didn't work out.
https://downloads.teradata.com/tools/reference/teradata-python-module?page=3
Comment by :- ericscheie

I tried following code:-

`for result in session.execute(
"""REPLACE PROCEDURE test.testProcedure1
(IN p1 INTEGER, OUT p2 INTEGER)
BEGIN
SET p2 = p1;
END;"""):
print(result)

result = session.callproc(
"test.testProcedure1",
(12345, teradata.OutParam("p2", dataType="INTEGER")))
print(result.p2)
`
The result it printed for result.p2 was:-
NaN

The logs generated shows following line:-

Procedure Executed! Duration: 0.075 seconds, Procedure: test.testProcedure1, Params: (12345, OutParam(name=p2, size=-3))

Using:-

  1. python (2.7.10) - teradata module version - 15.10.0.21
  2. Teradata 16.10

Please help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /