Thanks Petite,
I get it, great. Only another quick question, How can I simulate a
calendar table(maybe using the strftime funtion)?
Danilo

2011/5/18 Petite Abeille <petite.abei...@gmail.com>:
>
> On May 18, 2011, at 10:17 PM, Pavel Ivanov wrote:
>
>> SQL wasn't intended for and can't solve such tasks.
>
> Of course it can.
>
> Assuming a calendar and an event table:
>
> select calendar.date
> from   calendar
>
> where calendar.date between '20110101' and '20110201'
> and not exists ( select 1 from event where calendar.date between 
> event.start_date and event.end_date)
>
> And where are analytics when one need them? :)
>
> http://www.orafaq.com/node/55
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to