I have two tables:
The first table’s primary key is sireID
It holds the picture of the multiple sires, their name, the owner’s name and a brief description
The second table holds the trial scores of the individual dogs, joined by the sireID from table one.
I tried using a join to output the dog’s info and it’s scores :
<cfquery name="getDetailsQuery1" datasource="#application.database#">
select *
from sires
order by sireID
</cfquery>
<cfquery name="getDetailsQuery2" datasource="#application.database#">
select *
from scores
where sireID = #getDetailsQuery1.sireID#
</cfquery>
<CFQUERY NAME="getDetails" datasource="#application.database#">
SELECT * FROM getDetailsQuery1
UNION
SELECT * FROM getDetailsQuery2
ORDER BY sireID
</CFQUERY>
I get an error message:
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'getDetailsQuery1'. Make sure it exists and that its name is spelled correctly.
Other than switching over to mySQL is there a better way to query this?
I am trying to create the following
(First Table)
Dog’s Picture
Owner
Description
(Second Table)
Table of the trial scores for this dog
Next record