Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newspeer.clara.net!news.clara.net!diablo.theplanet.net!news.theplanet.net!not-for-mail
From: Scotty <invallid@invalid.spam>
Newsgroups: comp.databases.theory
Subject: Re: Hotel Booking dates subquery
Date: Mon, 11 Nov 2002 16:33:19 +0000
Lines: 28
Message-ID: <5nmvsucjj76c2cgbpi5mfa23mvd96mvi1t@4ax.com>
References: <5dkosuog0v9698ei9juhfbm2pull0nqqn2@4ax.com> <ajptsu4fo8c22u6edrlhc95ffeht6udfn5@4ax.com> <3dcf0255$1@news.uia.ac.be> <aenusu0rolqjlrsai6njprrpm8apmnv1tu@4ax.com> <3dcf8aa3$1@news.uia.ac.be>
NNTP-Posting-Host: 81.77.121.64
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news6.svr.pol.co.uk 1037032392 15852 81.77.121.64 (11 Nov 2002 16:33:12 GMT)
NNTP-Posting-Date: 11 Nov 2002 16:33:12 GMT
X-Complaints-To: abuse@theplanet.net
Summary: YHBT
X-Newsreader: Forte Agent 1.8/32.548
X-No-Archive: yes
Xref: newsfeed1.easynews.com comp.databases.theory:23549
X-Received-Date: Mon, 11 Nov 2002 09:32:57 MST (news.easynews.com)

Jan Hidders wrote:
>Scotty  wrote:
>>Jan Hidders wrote:
>>>Scotty  wrote:
>>>>
>>>>I'm curious to ask whether you think the theory behind my query works
>>>>or not, given test data that reasonable constraints would allow.
>>>
>>>Run the test and you will know. If it finds the right bookings your theory
>>>is correct, if it doesn't it's false.
>>
>>Then it's correct.
>
>Yes, it is. Somehow I seemed to have swapped the '<' for '>' when I first
>read your query. My apologies for the misunderstanding. 

That's ok, I wasn't entirely sure myself, thanks for checking it over
for me.

>Btw., you can still
>simplify your query a litte: you can remove tha -todate(...) everywhere and
>the first and second equations are redundant.

Ok, I'll have a play with it and see what optimisation can be
performed. I've yet to put in the check for room status so it should
hopefully be a decent query when its done.

Cheers.
