Advertisement
tvaught

price_db connection specifics

Aug 30th, 2011
3,469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. conn = sqlite3.connect(dbfilename,
  2.         detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
  3.  
  4.     sql = "SELECT symbol, date as 'date [datetime]', open, high, low, " \
  5.           "close, volume, adjclose from stocks where symbol='%s' and " \
  6.           "date>=%s and  date<=%s" % (symbol, startdate, enddate)
  7.  
  8.     qry = conn.execute(sql)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement