sqlalchemy - Python Dataset module error: You might need to add explicit type casts -


having difficulties query data postgres db using python dataset module , data type varchar when query data receive following error.

error:

line 1: ...t * sources.product post = 31055183...

hint: no operator matches given name , argument type(s). might need add explicit type casts. [sql: 'select * sources.product post = 310551835']

snip of code used:

deltas = db.query('select * deltas.deltas_del')  idx in deltas:             print type(idx['post'])             prod = db.query('select * sources.product post = 310551835') 

add quotes value in right hand side of clause since you're filtering varchar.

prod = db.query("select * sources.product post = '310551835'"


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -