SQLAlchemy and Oracle Functions?

Sick Monkey sickcodemonkey at gmail.com
Thu Mar 8 16:23:06 EST 2007


Helpful Links
    http://sourceforge.net/projects/cx-oracle

    http://www.python.net/crew/atuining/cx_Oracle/html/cursorobj.html

======================
Example:
Replace the data types as appropriate.

v_Vars = v_Cursor.setinputsizes(p_Result = cx_Oracle.NUMBER)
v_Cursor.execute("""
    begin
      :p_Result := sch.pkg.myfunction(:p_Param1, :p_Param2, :p_Param3);
    end;""",
    p_Param1 = 1,
    p_Param2 = "Some string",
    p_Param3 = "A different string")
print "Result:", v_Vars["p_Result"].getvalue()



On 8 Mar 2007 13:11:00 -0800, Greg Copeland <gtcopeland at gmail.com> wrote:
>
> I have  a need to call an Oracle function, which is not the same thing
> as a stored procedure.  Can SQLAlchemy do this directly?  Indirectly?
> If so, an example would be appreciated.  If not, how do I obtain the
> raw cx_Oracle cursor so I can use that directly?
>
> Thanks,
>
> Greg
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070308/f2048253/attachment.html>


More information about the Python-list mailing list