Subject: CAP (Only != CREATE is needed)

From: Doug Royer <[email-masked]>
Date: Tue, 08 Jan 2002 16:03:51 -0700

In

>4.1.6 Query for all Non-Booked Entries
>
>   The following example selects the entire content of all scheduling
>   VEVENTS in the CS.  The default for EXPAND is FALSE, so the
>   recurrence rules will not be expanded.
>
>   BEGIN:VQUERY
>   QUERY:SELECT * FROM VEVENT,VTODO
>     WHERE (METHOD IS 'REQUEST' OR METHOD IS 'ADD' OR
>            METHOD IS 'PUBLISH' OR METHOD IS 'CANCEL' OR
>            METHOD IS 'REPLY'   OR METHOD IS 'COUNTER' OR
>            METHOD IS 'REFRESH' OR METHOD IS 'DECLINECOUNTER')
>   END:VQUERY

(1) (a) Is 'IS' (above) valid 'standard' SQL syntax? I think it is some
    vendors extension. I think the standard way is to use '='.

    (b) Someone added 'IS' ['NOT']'NULL' to the cap draft - did I
    miss the discussion?

    (c) The usage of 'IS' above does not match the ABNF added.

    (d) The only example of NULL given is where it is NOT needed.

	QUERY:SELECT * FROM VQUERY WHERE QUERYNAME IS NOT NULL

      is the same as:
	
	QUERY:SELECT * FROM VQUERY

        Because non-named VQUERY's are not stored - there would
        be no-way to get or use non-named ones? correct?

    (e) So why do we need 'IS' ['NOT'] NULL  in SQL-MIN?

    (f) The example should be shown in SQL-MIN syntax.

(2) This is the same as the example above and simpler 
    (METHOD:CREATE issue the WG talked about).

     BEGIN:VQUERY
     QUERY:SELECT * FROM VEVENT,VTODO WHERE METHOD != CREATE
     END:VQUERY

   The following example fetches the UIDs of all non-booked VEVENTs and
   VTODOs.

(3) Again, use ' = ', not 'IS'.

   BEGIN:VQUERY
   QUERY:SELECT UID FROM VEVENT,VTODO WHERE
     WHERE (METHOD IS 'REQUEST' OR METHOD IS 'ADD' OR
            METHOD IS 'PUBLISH' OR METHOD IS 'CANCEL')
   END:VQUERY