Subject: New "4.1.6 Query for all Non-Booked Entries"

From: Doug Royer <[email-masked]>
Date: Sat, 16 Feb 2002 16:53:06 -0700

4.1.6 Query for all Non-Booked Entries

   The following example selects the entire contents of all [ITIP]
   non-booked VTODOs and VEVENTs with their METHOD set to one of
   the [ITIP] METHODs. The default for EXPAND is FALSE, so the
   recurrence rules will not be expanded.

   BEGIN:VQUERY
   QUERYID:Fetch VEVENT and VTODO iTIP components
   QUERY:SELECT * FROM VEVENT WHERE
    METHOD = 'REQUEST' OR METHOD = 'ADD' OR METHOD = 'PUBLISH' OR
    METHOD = 'CANCEL' OR METHOD = 'REPLY' OR METHOD = 'COUNTER' OR
    METHOD = 'REFRESH' OR METHOD = 'DECLINECOUNTER'
   QUERY:SELECT * FROM VEVENT WHERE
    METHOD = 'REQUEST' OR METHOD = 'ADD' OR METHOD = 'PUBLISH' OR
    METHOD = 'CANCEL' OR METHOD = 'REPLY' OR METHOD = 'COUNTER' OR
    METHOD = 'REFRESH' OR METHOD = 'DECLINECOUNTER'
   END:VQUERY

   The following example fetches all VEVENT and VTODO booked entries
   from the CS.

   BEGIN:VQUERY
   QUERYID:Fetch All Booked VEVENT and VTODO components
   QUERY:SELECT * FROM VEVENT WHERE METHOD = 'CREATE'
   QUERY:SELECT * FROM VTODO WHERE METHOD = 'CREATE'
   END:VQUERY

   The following fetches the UID for all VEVENT and VTODO components
   that have been marked for delete (METHOD:DELETE).

   BEGIN:VQUERY
   QUERYID:Fetch UIDs of marked for delete VEVENTs and VTODOs
   QUERY:SELECT UID FROM VEVENT WHERE METHOD = 'DELETE'
   QUERY:SELECT UID FROM VTODO WHERE METHOD = 'DELETE'
   END:VQUERY

   In the examples above they were bunched into groups of similar
   queries. They could be performed all at once by having all of
   the QUERY property in one BEGIN/END VQUERY component.

---

From: Alan Davies <[email-masked]>
Date: Mon, 18 Feb 2002 10:07:23 -0500

At 04:53 PM 16/02/2002 -0700, Doug Royer wrote:
>    QUERY:SELECT * FROM VEVENT WHERE [...]
>    QUERY:SELECT * FROM VEVENT WHERE [...]

Copy & Paste Typo; you meant to put VTODO in the 'FROM' clause
of one of the queries.

--Alan

---

From: Bernard Desruisseaux <[email-masked]>
Date: Thu, 21 Feb 2002 17:41:47 -0500

Doug Royer wrote:
>    ...

Change QUERYID to NAME and add a random QUERYID.

Same for examples of VQUERY.

Regards,
Bernard
-- 
Bernard Desruisseaux                    mailto:[email-masked]
Research & Development                  Tel.  : +1 514 733-8500 x4213
Steltor                                 Fax   : +1 514 733-8878

---

From: Doug Royer <[email-masked]>
Date: Thu, 21 Feb 2002 16:53:25 -0700

> Same for examples of VQUERY.

That string is a valid QUERYID.
I will add a NAME property.