By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,275 Members | 1,745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,275 IT Pros & Developers. It's quick & easy.

Query in SQLAlchemy

P: 1
Hi,

I am currently working on a job recorder and i dont know how to translate this query into an SQL Alchemy query,

SELECT * from productivity_det where "Employee_Num"='0204110020' and "Date">='09/10/2011' and "Date"=<'09/16/2011';

HERE IS MY TABLE STRUCTURE:

id = Column (Integer, primary_key=True)
Employee_Num = Column(String)
Group = Column(String)
Process = Column(String)
Batch_Num = Column(String)
State = Column(String)
County = Column(String)
Date = Column(Date)

Thanks!
Sep 15 '11 #1
Share this Question
Share on Google+
1 Reply


P: 1
Expand|Select|Wrap|Line Numbers
  1. engine.query(ProductivityD).filter(and_(ProductivityD.Employee_Num == '0204110020' , and_(ProductivityD.Date >= datevalue1, ProductivityD.Date <= datevalue2)).all()
engine, and ProductivityD can change depending on the name you instanstiated and declared each one.
Hope it helps
Nov 19 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.