I have the following query
<cfquery name="qryEvent" datasource="#request.ds#">
SELECT tbl_event.Event_ID, tbl_event.Event_LocationID,
tbl_event.Event_Date, tbl_event.Event_Title,
tbl_location.location_Name
FROM tbl_event, tbl_location
WHERE 1 = 1
AND (tbl_event.Event_LocationID = tbl_location.location_ID
OR tbl_event.Event_LocationID = 1000)
AND tbl_event.Event_date > #now()#
AND tbl_event.Event_date < #dateadd("m",5,now())#
ORDER BY tbl_event.Event_Date ASC
</cfquery>
Returns correct data but I need to pull only the top 3 records for each of
the 13 possible tbl_Event.Event_LocationID
Is this even possible in one query?
Thanks
-Ryan
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: XML output James Maltby
- RE: XML output Andres
- RE: XML output Rob Baxter
- RE: XML output Rob Baxter
- RE: XML output James Maltby
- xml output cf
- RE: xml output Michael T. Tangorre
- RE: xml output cf
- Com Object not working in 6.1 Brook Davies
- OT: Do you have a Wheel on you mouse?... Brook Davies
- Re: OT: SQL Query Ryan Roskilly
- Re: OT: SQL Query Jochem van Dieten
- RE: OT: SQL Query Ryan Roskilly
- Extracting CFID and CFTOKEN? Nick Baker
- Re: Extracting CFID and CFTOKEN? Calvin Ward