So is the field NULL if there are no records there? If so, then I think that
you just add an OR clause.

SELECT service_population,agency,city,state,int_agency_id, ROWNUM AS
r, COUNT(agency) OVER() AS rowcount
FROM internships
WHERE 1=1 AND dept = 'knes' AND status <> 'Removed' OR Status = NULL
ORDER BY UPPER(agency) ASC


On 8/9/07, Daniel Kessler  wrote:
>
> I have a query that is supposed to grab any record that has a status
> not equal to 'Removed'.  The status can be 'Approved', 'Interested',
> 'Removed' or simply empty.  With the query below, it's not returning
> the ones that are designated empty, though it seems to me that it
> should.  Status is not a required field so it'll often be empty.
>
> SELECT service_population,agency,city,state,int_agency_id, ROWNUM AS
> r, COUNT(agency) OVER() AS rowcount
> FROM internships
> WHERE 1=1 AND dept = 'knes' AND status <> 'Removed'
> ORDER BY UPPER(agency) ASC
>
>
> So why isn't it showing these records?
>
> thanks.
>
>
> --
>
> Daniel Kessler
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285822
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to