Hello Alex,

Again thanks very much for all your answers.

Your suggestion regarding the optimization in the database model is really, really nice!

"(rel year (+Aux +Ref +Number) (week))" makes a huge difference and works very well.

as an example "(mapcar show (collect 'year '+Agenda (2019 32))"

gives the whole week in a very very short query.

All these lead me to two more questions:

1) is it possible to have something more than (week) in "(rel year (+Aux +Ref +Number) (week))",

for example, can I add the "monthnum"? It could be nice to also have something like

"(collect 'year '+Agenda (2019 8))" in order to get quickly the whole month "august"

2) is there any way to sort the results of "(collect 'year '+Agenda (2019 32))" by one (or more)

key(s) of the database?

Thanks, regards,

Eric


Le 01/10/2019 à 14:15, Alexander Burger a écrit :
Hi Eric,

So far I've done the mods to the database rel you suggested and I have this 
query:
(? (select (@A) ((year +Agenda 2019) (week +Agenda 32) (same 2019 @A year) 
(same 32 @A week)) )
which works and gives me results like these:
@A = {1643}
...
@A = {1731}

Now, is there any way to get all those results in a list like this:
( {1643} ... {1731})
Yes, by passing this query to 'solve':

    (solve '((select ...


If you made the model with +Aux, a much more efficient way is

    (collect 'year '+Agenda (2019 32))

or, to get week 32 till 40,

    (collect 'year '+Agenda (2019 32) (2019 40))

☺/ A!ex


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to