This seems to work. I also found out the table had overlapping date ranges and when I deleted the "overlapping" ranges the between syntax worked as well.
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Downall Posted At: Friday, November 04, 2005 2:59 PM Posted To: RB7-L Conversation: [RBG7-L] - Re: SQL Syntax Subject: [RBG7-L] - Re: SQL Syntax Charles, Syntactically, it looks okay. However, I recall the BETWEEN did not work with subqueries for the two values around the AND, so maybe it doesn't work this way, either. Try this and see if you get the same result as with BETWEEN: select * from evaluations t1, StfMbrCEU t2 + where t1.StfMbr = t2.StfMbr + and t1.DateFinished >= t2.CEUTimePeriodFrom + and t1.DateFinished <= t2.CEUTimePeriodTo Bill Charles Parks wrote: > Would this be the correct sql syntax to join two tables on StfMbr and > where DateFinished would be after CEUTimePeriodFrom but before > CEUTimePeriodTo? > > select * from evaluations t1, StfMbrCEU t2 where t1.StfMbr = t2.StfMbr > and t1.DateFinished between t2.CEUTimePeriodFrom and > t2.CEUTimePeriodTo > > When I do a browse on it I some rows repeated. > > >
