Hi again, > query_string = "update mytable set " + ",".join ( [ key + "=%s" for > key, value in d_items ] ) > > cursor.execute ( query_string, tuple ( [ value for key, value in > d_items ] ) ) >
Thanks for your prompt reply. I kinda got it, but the the part that I forgot to mention was that the values are not retrieved from the dictionary. What I retrieve from the dictionary are the column names and the target. The values are in a separate list, so how would it be in this case? I'm sorry if I sound silly, but I'm new to this. Thanks! Patty _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig