From: Timothy S. <ti...@op...> - 2004-11-17 23:10:15
|
Karsten Hilbert wrote: >>hello i'm stuck with a problem. whats the best way to store money types. >> >> >Use numeric. > >Karsten > > Ok i must be doing something wrong here i'm still getting the same error and i have changed my types to numeric. (EnteredBy,DateEntered,ForDate, ForVenue, TillName,Tape,Cash, GM, VenueManager, AsstManager, BarManager, PRCards, otherPromo, Functions, Accounts, Spill, Orings, Variance)) File "/usr/local/lib/python2.3/site-packages/pyPgSQL/PgSQL.py", line 3048, in execute self.res = self.conn.conn.query(_qstr % parms) TypeError: float argument required here is my code i think is the problem cur.execute("INSERT INTO DailyTakings VALUES (%s,%s, %s, %s,%s,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f)", (EnteredBy,DateEntered,ForDate, ForVenue, TillName,Tape,Cash, GM, VenueManager, AsstManager, BarManager, PRCards, otherPromo, Functions, Accounts, Spill, Orings, Variance)) |