<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-NZ link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hi All.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I am the stage with problem that SOMEONE who’s a
bit more lateral thinking than me might be able to see the solution.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have the following data (just a snapshot).<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Item Start End<o:p></o:p></p>
<p class=MsoNormal>1 15
Feb 2010 26 Feb 2010<o:p></o:p></p>
<p class=MsoNormal>2 22
Feb 2010 26 Feb 2010<o:p></o:p></p>
<p class=MsoNormal>3 15
Feb 2010 29 Feb 2010<o:p></o:p></p>
<p class=MsoNormal>4 24
Feb 2010 25 Feb 2010<o:p></o:p></p>
<p class=MsoNormal>5 23
Feb 2010 25 Feb 2010<o:p></o:p></p>
<p class=MsoNormal>6 24
Feb 2010 31 Feb 2010<o:p></o:p></p>
<p class=MsoNormal>7 22
Feb 2010 26 Feb 2010<o:p></o:p></p>
<p class=MsoNormal>8 23
Feb 2010 24 Feb 2010<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>What I am doing is TRYING to find all items that fall
between a given date range.<o:p></o:p></p>
<p class=MsoNormal>In this case I am trying to find all the items between the
22 Feb and 26 Feb.<o:p></o:p></p>
<p class=MsoNormal>i.e. all of the items should be returned in the above snap
shot.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I am trying the following where clause (not real field names):-<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>WHERE (#22 FEB 2010 13.00.00# Between START And END)<o:p></o:p></p>
<p class=MsoNormal>AND (#26 FEB 2010 10.00.00# Between START And END)<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>However, that missed out Items 1,34,5,6 and I think 8.<o:p></o:p></p>
<p class=MsoNormal>If I try:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>WHERE START >=#22 FEB 2010 13.00.00# And ENDTIME <=#26
FEB 2010 10.00.00# <o:p></o:p></p>
<p class=MsoNormal>It misses out 1,3 and 6<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I cant go<o:p></o:p></p>
<p class=MsoNormal>WHERE START >=#22 FEB 2010 13.00.00# or ENDTIME <=#26
FEB 2010 10.00.00# as that returns to many records.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Can anyone see what I am missing? I don’t mind if I
have to do it in separate queries as I can just union them, but I have been
looking at this too long and I just cant figure it out, so I thought another
set of eyes might help <span style='font-family:Wingdings'>J</span><o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Thanks, Jeremy<o:p></o:p></p>
<p class=MsoNormal> <o:p></o:p></p>
</div>
</body>
</html>