diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/cusip_numbers.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/cusip_numbers.py b/python/cusip_numbers.py index 72e9f6f3..142a8e6b 100644 --- a/python/cusip_numbers.py +++ b/python/cusip_numbers.py @@ -20,7 +20,12 @@ dealnames = cursor.fetchall() for dealname in dealnames:
cursor.execute("SELECT p_cusip, p_curr_subordination, p_curr_thickness from et_deal_subordination(%s)",
dealname)
- cursor.executemany("INSERT INTO et_model_numbers(Cusip, subordination, thickness) VALUES(%s, %s, %s)",
- cursor.fetchall())
+ # cursor.executemany("UPDATE et_cusip_model_numbers SET subordination = %s, thickness = %s WHERE cusip = %s",
+ # cursor.fetchall())
+ data = cursor.fetchall()
+ data = [ t + dealname for t in data]
+ cursor.executemany("INSERT INTO et_cusip_model_numbers(cusip, subordination, thickness, dealname) "
+ "VALUES(%s, %s, %s, %s)", data)
conn.commit()
conn.close()
+print "done"
|
