mercredi 20 août 2014

creating tables in python wih a select statement


Vote count:

0




I want to do something like this but am getting error


inserttable= """create table #temp2 as select distinct uid from usage_event WHERE dayhour >= '{0}' and dayhour < '{1}' and event_category = '{2}' and event_action = '{3}' and oem_preload ='{4}' limit 100000 """


curses = conn.cursor() #dict_curses = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) curses.execute(inserttable.format(dayleft, dayright, event_category, event_action, oem)) results=curses.fetchone()



asked 1 min ago







creating tables in python wih a select statement

Aucun commentaire:

Enregistrer un commentaire