Thanks!

2009/7/1 William Stein <wst...@gmail.com>:
>
> On Wed, Jul 1, 2009 at 10:58 AM, Robert
> Bradshaw<rober...@math.washington.edu> wrote:
>>
>> On Jul 1, 2009, at 1:47 AM, Aleksey Gogolev wrote:
>>
>>> Hello!
>>>
>>> I need to operate on a statistical data in the sage notebook. But
>>> before I do that I need to get this data from the Oracle DB. Is there
>>> a way to get data from DB?
>>> Cann't find the answer manually :( Any help would be appreciated.
>>
>> Try searching for a way to do it from Python--it's not unlikely
>> someone's already written a package to do so. Alternatively, see if
>> you can export the data as a text file and then parse it (again,
>> using all that Python has to offer).
>
> Indeed, Googling
>
>        oracle db python
>
> yields numerous hits.   The first hit has this example, which
> obviously requires first installing some package:
>
>
> import cx_Oracle
>
> connstr='scott/tiger'
> conn = cx_Oracle.connect(connstr)
> curs = conn.cursor()
> curs.arraysize=50
>
> curs.execute('select 2+2 "aaa" ,3*3 from dual')
> print curs.description
> print curs.fetchone()
>
> conn.close()
>
> William
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to