jquery - Select statement sqlite between dates -
i have 1 table storing 2 dates in form: 2014-12-05 example. dates date , date to. want select items different table has date column. want following:
select * table2 date between fromdate , todate except fromdate , todate columns table1, whereas 'date' table2. there succinct way this?
you kind of join between the 2 tables , select entries join. simple cartesian join can achieved comma-separating tables querying from.
create table holidays ( name text not null, fromdate text not null, todate text not null ); create table appointments ( name text not null, date text not null ); insert holidays values ('christmas holiday', '2014-12-05', '2014-12-24'); insert appointments values ('dentist', '2014-11-06'); insert appointments values ('doctor', '2014-12-06'); select h.name, a.name, a.date appointments a, holidays h a.date between h.fromdate , h.todate;
Comments
Post a Comment