cnxn.setdecoding(pyodbc.SQL_WCHAR, encoding='gb18030')
cnxn.setdecoding(pyodbc.SQL_CHAR, encoding='gb18030')
cnxn.setencoding(encoding='gb18030')
select *from 表名 where tradedate>='2022-08-29'
出现这样的报错:[Informix][Informix ODBC Driver][Informix]Invalid year in date (-1204) (SQLExecDirectW)')
因为如果不用日期作为查询条件,是可以返回结果的。
select *from 表名
这样可以返回结果。
但是不知道应该怎么做,才能“在python 中 通过 ODBC 连接 informix 数据库”,能够用日期作为查询条件
建議把 table schema,和一些模擬資料 列出來,讓其他人可以測試。