Lisa, If DirCategory and Subdircategory are numeric fields, you cannot use any quotations marks. Nancy
-----Original Message----- From: Lisa Deemy [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 1:48 PM To: CF-Newbie Subject: Error(s) Thank you in advance. Now that my head is bloody I think I'll finally post for some help. I am trying to return some data from table(s). I've gotten all kinds of errors and worked through fixing them. The table names if it matters are Directory; DirCategory; and Subdircategory. In the table Directory there is a column named TOWN There is a DirCategory of 103 and a Subdircategory of 100. At the present time I'm getting this error: Template: /autofs/wwwusr/www1/endlessm/pages/lisa_test_0003.cfm QueryString: Error: Error Executing Database Query. [Macromedia][Oracle JDBC Driver][Oracle]ORA-00936: missing expression The error occurred on line 1. Here is my code: <CFQUERY NAME="TOWN" DATASOURCE="endless" username="endlessm" password="endless97"> SELECT TOWN FROM Directory WHERE name = 'TOWN' AND DirCategory = '103' AND Subdircategory = '100' ORDER BY <TOWN> </CFQUERY> <CFOUTPUT QUERY="TOWN"> <cfif isDefined('TOWN')> <table><tr><td> <tr><td valign="top" colspan="3" ><fontface="geneva, arial, helvetica" size=2 >#TOWN#</font></td></tr> </td></tr></table></cfif></CFOUTPUT> If I change SELECT TOWN to SELECT <TOWN> or SELECT "TOWN" I get the same error. If I remove ORDER BY <TOWN> I get the error: Template: /autofs/wwwusr/www1/endlessm/pages/lisa_test_0003.cfm QueryString: Error: Error Executing Database Query. [Macromedia][Oracle JDBC Driver][Oracle]ORA-00904: invalid column name The error occurred on line 1. If I remove ORDER BY <TOWN> or change it to ORDER BY "TOWN" or ORDER BY 'TOWN' I get the same error. If I change AND DirCategory = '103' AND Subdircategory = '100' to AND DirCategory_id = '103' AND Subdircategory_id = '100' or AND Category_id = '103' AND Subcategory_id = '100' or AND Category_id = "103" AND Subcategory_id = "100" I still get invalid column name Anyone have a clue? If anyone needs clarification on anything let me know. I have this feeling there's something I'm just not getting about this whole thing. Any help would be much appreciated. I'm truly at my wits end. Thanks, Lisa ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1422 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
