View Multiple Calendars with WebDAV

I am successfully displaying calendar appointments for a specific Exchange account. I do this by using WebDav and passing a request string like the following:

"<?xml version=\"1.0\"?><g:searchrequest xmlns:g=\"DAV:\"><g:sql>SELECT \"urn:schemas:calendar:location\", \"urn:schemas:httpmail:subject\", \"urn:schemas:calendar:dtstart\", \"urn:schemas:calendar:dtend\", \"urn:schemas:calendar:busystatus\", \"urn:schemas:calendar:instancetype\" FROM Scope('SHALLOW TRAVERSAL OF \"https://www.mydomain.com/Exchange/Allen/Calendar\"') WHERE NOT \"urn:schemas:calendar:instancetype\" = 1 AND \"DAV:contentclass\" = 'urn:content-classes:appointment' AND \"urn:schemas:calendar:dtstart\" > '2011/10/04 00:00:00' AND \"urn:schemas:calendar:dtend\" &lt; '2011/10/05 00:00:00' ORDER BY \"urn:schemas:calendar:dtstart\" ASC</g:sql></g:searchrequest>"

Note that the above string has a SELECT statement with a FROM clause, similar to most database queries. The FROM clause references the calendar for the Exchange account Allen ("https://www.mydomain.com/Exchange/Allen/Calendar\"). This (among other lines of code not included here) successfully retrieves and displays Allen's appointments.

What I want to do is retrieve and display the appointments for 2 or more calendars at the same time. So my question is, how do I chain 2 or more requests in the above string?

From a standard database query standpoint, maybe a JOIN clause can be added in order to include another source (calendar). Maybe the above SELECT could have Allen's appointments (FROM "https://www.mydomain.com/Exchange/Allen/Calendar\") and then include Bob's appointments with something like JOIN "https://www.mydomain.com/Exchange/Bob/Calendar\". But JOINs genearlly imply that there is some relation between the 2 sources. But Allen and Bob's calendar data are completely independent appointments, and not related in any way.

What may be more appropriate is a UNION statement that would include the SELECTed data from Allen's calendar along with (UNION) the SELECTed data from Bob's calendar.

The bottom line is that I can't figure out how to modify the above string to request calendar data from multiple sources. Does anyone know how to make this work?

Thanks
LVL 2
brian_appliedcpuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LeeDerbyshireCommented:
Sadly, you can't do that with Exchange's WebDAV SQL.  It is only a tiny subset of ANSI SQL.  There is a list of unsupported SQL commands here:
http://msdn.microsoft.com/en-us/library/aa123645(v=EXCHG.65).aspx

You'll need to get the data from both calendars separately, and then do the hard work in code.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brian_appliedcpuAuthor Commented:
h
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
File Sharing Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.