> > Since we use recursive triggers, set recursive_triggers pragma
> > beforehand if not yet done.
>
>Cunning. A bit of a Rube Goldberg apparatus though, no?
Huh? Still way more flexible than having to modify C source of a vtable
module, should you have to adapt anything.
Yeah, it's kind of
On May 19, 2011, at 11:44 AM, Jean-Christophe Deschamps wrote:
> Since we use recursive triggers, set recursive_triggers pragma
> beforehand if not yet done.
Cunning. A bit of a Rube Goldberg apparatus though, no?
___
sqlite-users mailing list
>On Wed, May 18, 2011 at 4:10 PM, Petite Abeille
> wrote:
> > On May 18, 2011, at 10:50 PM, Danilo Cicerone wrote:
> >> How can I simulate a
> >> calendar table(maybe using the strftime funtion)?
> >
> > Well, you have two broad options:
> >
> > (1) materialize the
On May 19, 2011, at 12:28 AM, Igor Tandetnik wrote:
> That's SQLite extension. I don't believe it's legal standard SQL. The
> alias in the SELECT clause acts kind of like a macro; its use in the
> rest of the statement is simply replaced with the corresponding expression.
Mind-boggling.
On 5/18/2011 6:11 PM, Petite Abeille wrote:
> In other words, how come the following works in SQLite:
>
> select 1 as value where value> 0;
>
> Or even weirder:
> select 1 as value where value = 0;
>
> There is no from clause, there is no column 'value' per se, but nonetheless
> that non
On Wed, May 18, 2011 at 5:11 PM, Petite Abeille
wrote:
> Where does the start_gap and end_gap come from? They are only declared in the
> select part of the inner select statement, and nowhere in the from part. But
> nonetheless, SQLite manages to use these non existing
On May 18, 2011, at 11:28 PM, Igor Tandetnik wrote:
> On 5/18/2011 4:17 PM, Pavel Ivanov wrote:
>>> I need help to build a statement in order to select all days free from
>>> events in a specific time range.
>>
>> This kind of task should be implemented in your application. SQL
>> wasn't
Amazing!
Thanks a lot.
2011/5/18 Igor Tandetnik :
> select startGap, min(endGap) from
> (
> select date(e1.endDate, '+1 day') startGap, date(e2.startDate, '-1
> day') endGap
> from (select startDate, endDate from events
> union all
> select '' startDate,
On 5/18/2011 4:17 PM, Pavel Ivanov wrote:
>> I need help to build a statement in order to select all days free from
>> events in a specific time range.
>
> This kind of task should be implemented in your application. SQL
> wasn't intended for and can't solve such tasks.
Sounds like a challenge:
On Wed, May 18, 2011 at 4:10 PM, Petite Abeille
wrote:
> On May 18, 2011, at 10:50 PM, Danilo Cicerone wrote:
>> How can I simulate a
>> calendar table(maybe using the strftime funtion)?
>
> Well, you have two broad options:
>
> (1) materialize the calendar as a table
>
Thanks again.
2011/5/18 Petite Abeille :
>
> On May 18, 2011, at 10:50 PM, Danilo Cicerone wrote:
> (1) materialize the calendar as a table
> (2) virtualize the calendar as a generator
>
___
sqlite-users mailing list
On May 18, 2011, at 10:50 PM, Danilo Cicerone wrote:
> How can I simulate a
> calendar table(maybe using the strftime funtion)?
Well, you have two broad options:
(1) materialize the calendar as a table
(2) virtualize the calendar as a generator
The first option is brutal, but simple. E.g.
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 :
>
> On May 18, 2011, at 10:17 PM, Pavel Ivanov wrote:
>
>> SQL wasn't intended for and can't solve such
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
> I need help to build a statement in order to select all days free from
> events in a specific time range.
This kind of task should be implemented in your application. SQL
wasn't intended for and can't solve such tasks.
Pavel
On Wed, May 18, 2011 at 4:06 PM, Danilo Cicerone
Hi to all,
I need help to build a statement in order to select all days free from
events in a specific time range.
E.g.:
- Range(-MM-DD) from 2011-01-01 to 2011-02-01.
- Event 1 from 2011-01-02 to 2011-01-08
- Event 2 from 2011-01-06 to 2011-01-12
- Event 3 from 2011-01-18 to 2011-01-21
16 matches
Mail list logo