I am on Oracle and I'm trying to do a fairly simple query and I just don't see the problem with it. I've stared now for way to long.
I am trying to differentiate between grocery store items and convenience store items and this is done by the cs_price column being an empty string. So I've adjusted the query so that if the store = 'convenience' then the price must not equal empt string. Unfortunately it always comes up with 0 records. If I remove the added WHERE then it returns records, just more than it should. <cfquery name="food_detail" datasource="eatsmart"> SELECT detail,food_store_id,cs_price FROM fsnep_food_store WHERE department = <cfqueryparam cfsqltype="cf_sql_varchar" value="#url.getFoodItems#"> AND food_item = <cfqueryparam cfsqltype="cf_sql_varchar" value="#url.getFoodDetail#"> <cfif url.store EQ 'convenience'> AND cs_price <> <cfqueryparam cfsqltype="cf_sql_varchar" value=""> </cfif> ORDER BY detail asc </cfquery> Here's a dump of the database: http://eatsmart.umd.edu/dbf/food_items/db_display.cfm thanks! -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD 20742-2611 301-405-2545 Phone www.phi.umd.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211186 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54