Have you tried 

AND cs_price != ''





On 7/5/05 12:57 PM, "Daniel Kessler" <[EMAIL PROTECTED]> wrote:

> 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!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:4:211189
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to