Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68335

Re: DB API question - where is a stored procedure's return value?

References <CANc-5Uz98mTCjUuk_yOHqWeZRwp6JnTCagTQ=bzobhtWAceKxg@mail.gmail.com> <CALwzidm0GJ37JTjUUGPPgEXnZoh0ck08B7i2H4SZXXD1VyDcbA@mail.gmail.com> <mailman.8114.1394666303.18130.python-list@python.org> <lfsg5p$e1a$1@reader1.panix.com>
Date 2014-03-14 04:01 +1100
Subject Re: DB API question - where is a stored procedure's return value?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.8129.1394730071.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Mar 14, 2014 at 1:43 AM, John Gordon <gordon@panix.com> wrote:
>> select foo() as value from dual
>
> That will get the return value into an SQL variable, but the OP wanted
> to know how to fetch it from python code.

In theory, that should produce a one-row-one-column SELECT result,
which can then be retrieved as such. (I say "in theory" because not
all back-end databases support the "from dual" notation - which, by
the way, I find extremely odd; what's 'dual' about it?)

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: DB API question - where is a stored procedure's return value? Petite Abeille <petite.abeille@gmail.com> - 2014-03-13 00:11 +0100
  Re: DB API question - where is a stored procedure's return value? John Gordon <gordon@panix.com> - 2014-03-13 14:43 +0000
    Re: DB API question - where is a stored procedure's return value? Skip Montanaro <skip@pobox.com> - 2014-03-13 10:14 -0500
    Re: DB API question - where is a stored procedure's return value? Chris Angelico <rosuav@gmail.com> - 2014-03-14 04:01 +1100
    Re: DB API question - where is a stored procedure's return value? random832@fastmail.us - 2014-03-13 13:22 -0400
    Re: DB API question - where is a stored procedure's return value? Chris Angelico <rosuav@gmail.com> - 2014-03-14 04:32 +1100

csiph-web