I think I am missing something:
Here is my code for outputting from multiple tables:
<CFQUERY NAME="GetCandy" DATASOURCE="JamDB" DBTYPE="ODBC">
SELECT Band.*,
Venue.*,
EarCat.*,
EarCandy.*
FROM Band,
Venue,
EarCat,
EarCandy
WHERE Band.BandID = EarCandy.BandID AND
Venue.VenueID = EarCandy.VenueID AND
EarCat.EarCatID = EarCandy.EarCatID
ORDER BY VenueState, VenueCity
</CFQUERY>
-------------------------------------------
Here are the tables:
-------------------------------------------
Band
------
BandID
BandName
BandURL
Style
-------
-------
------
Venue
------
VenueID
VenueName
VenueCity
VenueState
VenueURL
VenuePhone
----------
----------
--------
EarCandy
--------
EarcandyID
VenueID
GigDate
BandID
EarCatID
-----------
-----------
-----------
EarCAt
----------
EarCatID
EarCatName
--------------------------------------
Here is the error:
--------------------------------------
Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Band.BandID = EarCandy.BandID AND Venue.VenueID = EarCandy.VenueID AND EarCat.EarCatID = EarCandy.EarCatID'.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (1:1) to (1:58).
-----------------------------------------
Can someone tell me what I am doing wrong?
Thanks,
Eric
Here is my code for outputting from multiple tables:
<CFQUERY NAME="GetCandy" DATASOURCE="JamDB" DBTYPE="ODBC">
SELECT Band.*,
Venue.*,
EarCat.*,
EarCandy.*
FROM Band,
Venue,
EarCat,
EarCandy
WHERE Band.BandID = EarCandy.BandID AND
Venue.VenueID = EarCandy.VenueID AND
EarCat.EarCatID = EarCandy.EarCatID
ORDER BY VenueState, VenueCity
</CFQUERY>
-------------------------------------------
Here are the tables:
-------------------------------------------
Band
------
BandID
BandName
BandURL
Style
-------
-------
------
Venue
------
VenueID
VenueName
VenueCity
VenueState
VenueURL
VenuePhone
----------
----------
--------
EarCandy
--------
EarcandyID
VenueID
GigDate
BandID
EarCatID
-----------
-----------
-----------
EarCAt
----------
EarCatID
EarCatName
--------------------------------------
Here is the error:
--------------------------------------
Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Band.BandID = EarCandy.BandID AND Venue.VenueID = EarCandy.VenueID AND EarCat.EarCatID = EarCandy.EarCatID'.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (1:1) to (1:58).
-----------------------------------------
Can someone tell me what I am doing wrong?
Thanks,
Eric