PiRSquared17 / pyodbc

Automatically exported from code.google.com/p/pyodbc
Other
0 stars 0 forks source link

HP Vertica: non of INTERVAL values are supported #337

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

    Connect to Vertica db and query for example: "SELECT INTERVAL '1 DAY'"

What is the expected output? What do you see instead?

    I dont know, I think one of ['DateFromTicks', 'TimeFromTicks', 'TimestampFromTicks'] types. And I get exception: 
    pyodbc.Error: ('ODBC data type 1xx not supported. Cannot read column XXXX', 'HY000')

What version of the product are you using? On what operating system?

    OS: Ubuntu 12.10
    Python: Python 2.7.3
    pyodbc: 3.x

>>> import pyodbc
>>> pyodbc.version
'3.0.6'
>>> con = pyodbc.connect(dsn='Vertica')
>>> con.execute("SELECT INTERVAL '1 DAY'")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pyodbc.Error: ('ODBC data type 110 is not supported.  Cannot read column 
?column?.', 'HY000')

Original issue reported on code.google.com by setarc...@gmail.com on 15 Sep 2013 at 1:52

GoogleCodeExporter commented 9 years ago
I have this too. Would someone comment on whether this will be looked at? Thank 
you.

Original comment by matthewc...@gmail.com on 21 Jan 2014 at 5:16

GoogleCodeExporter commented 9 years ago
I see the same issue

Original comment by vishal.k...@gmail.com on 24 Mar 2014 at 7:03

GoogleCodeExporter commented 9 years ago
I have this same issue with NetezzaSQL database. Data type 110 is not supported.

Original comment by a.navarr...@gmail.com on 26 Aug 2014 at 8:42

GoogleCodeExporter commented 9 years ago
I think that INTERVAl data type is not on road map so far.
As workaround - covert interval to int(seconds).

Original comment by dan...@twingo.co.il on 26 Aug 2014 at 8:53

GoogleCodeExporter commented 9 years ago
Use vertica-pyodbc.
much better connector.

Original comment by be...@twingo.co.il on 14 Dec 2014 at 2:13