[thelist] Iterate through result set - Is this possible? (SQL)

Joshua Olson joshua at waetech.com
Tue May 31 08:57:27 CDT 2005

> -----Original Message-----
> From: Burhan Khalid
> Sent: Tuesday, May 31, 2005 9:47 AM

> Ken:
>    You gave me an idea of approaching the problem from a different 
> angle.  Instead of trying to find the gap, how about if I try to find 
> all dates that aren't taken. If there are 7 contiguous dates per hall 
> (that are > than now()) then that would be a possible hit.

Sounds reasonable to me.

> The problem now has become that I have been staring at the 
> issue for two days now, and I don't even know if THAT will work.  
> Can anyone give me a sanity check on that?

I think you are on the right course with this.  Bearing in mind that current
databases as exquisitely designed to handle sets, in mathematical terms,
this approach would be solid.

Once common mistake that people take when dealing with databases is that
they try to apply conventional programming and iterative techniques to
datasets.  While this sometimes works, it lends itself to more complicated
solutions.  Approaching a database task as if you were subdividing the data
into piles, comparing piles, and joining piles, often leads to a
straight-forward--and surprisingly simple--solution.  As databases evolve
this may not be the case, but for now it...

Joshua L. Olson
WAE Tech Inc.
Phone: 706.210.0168 

Monitor bandwidth usage on IIS6 in real-time:

More information about the thelist mailing list