Ok, I don't have the pyodbc so I can't test this example but it would
look something like this assuming the date was a 10 char string (numpy
doesn't support mx.DateTimes natively, much to my chagrin) and the
Close was a float:
> import pyodbc
> import numpy as np
>
> connection = pyodbc.connect('D
On 1/31/07, Tom Denniston <[EMAIL PROTECTED]> wrote:
> i would do something like the following. I don't have your odbc
> library so I mocked it up with a fake iterator called "it". This
> example would be for a two column result where the first is an int and
> the second a string. Note it create
i would do something like the following. I don't have your odbc
library so I mocked it up with a fake iterator called "it". This
example would be for a two column result where the first is an int and
the second a string. Note it creates a recarray which you can have
match you database column nam
On 1/31/07, BBands <[EMAIL PROTECTED]> wrote:
> import pyodbc
> import numpy as np
>
> connection = pyodbc.connect('DSN=DSNname')
> cursor = connection.cursor()
> symbol = 'ibm'
> request = "select to_days(Date), Close from price where symbol = '" +
> symbol + "' and date > '2006-01-01'"
> for row
Good afternoon,
The following works:
import pyodbc
import numpy as np
connection = pyodbc.connect('DSN=DSNname')
cursor = connection.cursor()
symbol = 'ibm'
request = "select to_days(Date), Close from price where symbol = '" +
symbol + "' and date > '2006-01-01'"
for row in cursor.execute(reques