Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

how do i join two tables in a cfquery, then order by date?

$
0
0

I have two tables of events that I want to join in a query, schoolCal and newSchedules. Both have schedID and event. I would like them to order by the eventDate. My code is:

 

<cfquery name="getevent" Datasource="#application.dsn#">

 

select schoolCal.eventDate, schoolCal.date_end, schoolCal.event, newSchedules.eventDate, newSchedules.event

from schoolCal,newSchedules

where schoolCal.schedID = newSchedules.schedID

order by eventDate

</cfquery>

 

Two problems, the largest problem the newSchedules table is not showing up in the output and I get an error when I try to order by eventDate

How do I get both tables to show and how do I get the cfquery  to order by eventDate? 


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>