Psycopg2 SyntaxError: invalid syntax on "INSERT INTO" database

andydtaylor at gmail.com andydtaylor at gmail.com
Wed Jan 9 21:20:10 EST 2013


Thanks for your help guys. 

I was actually doing a few things wrong, but I have got this script to work by declaring fields as varchar and all values as strings. But I would like to log journey time values in hours/minutes, so I will have to look into the following:

1. Retrieving this data from postgres as text, converting it and using it. I will need to add/subtract on this time value; or
2. Recognising it as a time class in the first instance by using the string parsing function.

Regards,

Andy



More information about the Python-list mailing list