This approach worked marvelously!!! Thank you very much John and Jim!!!
Erika
(with a *K*)
-----Original Message-----
From: John [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 11:59 PM
To: CF-Talk
Subject: RE: SQL help, pretty please...
Here is a different approach that would find the next conference even if it
was in the same month.
select top 1 CORFNBR, CODATE, COTIME, CONAME, CODESCR, COSPEAKER, COSPECIAL
from CONFERENCES, SPEAKERS
where CORFNBR IN (#ValueList(getconfnumbers.RCCORFNBR)#)
and COSPEAKER = SPRFNBR
and conferences.CODATE > (Database function to return todays date i.e.,
getdate(), now())
order by conferences.codate desc
John
with a "h" ;)
-----Original Message-----
From: Erika L Walker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 10:46 PM
To: CF-Talk
Subject: SQL help, pretty please...
Some pointing in the right direction please....
I generate an email based upon a user's attendance of a conference on a
particular day. The email is going to tell the user when the next conference
is.
I pull a list of all conferences.
<!--- Set up the next month criteria --->
<cfset nextMonth = (DatePart("m", now()) + 1)>
Here is my SQL statement:
select CORFNBR, CODATE, COTIME, CONAME, CODESCR, COSPEAKER, COSPECIAL
from CONFERENCES, SPEAKERS
where CORFNBR IN (#ValueList(getconfnumbers.RCCORFNBR)#)
and COSPEAKER = SPRFNBR
and month(conferences.CODATE) = #nextMonth#
Works great if there is a conference in June (for next month).
But not if the next conference is in say, August.
So,.. I can't see the light here....it's on the tip of my brain, but I'm
having trouble figuring it out. I need to loop through an index of nextMonth
until it matches a month in the conference list, right?
Am I thinking in the right direction?
Signed,
Going Loopy. (yeah, yeah, yeah, I already am!)
Erika
(with a *K*)
-----------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists