Are you considering the case where the field is NULL?  Probably want
to treat that the same as if it's the empty string, but you will need
an explicit consideration for that scenario:

select ...
from ...
where (RAPSSubmitted = '' OR RAPSSubmitted IS NULL )
and (RAPSRNS  = '' OR RAPSRNS  IS NULL)

cheers,
barneyb

On Tue, 1 Mar 2005 16:13:58 -0500, Claremont, Timothy
<[EMAIL PROTECTED]> wrote:
> Having a bad brain day today.
> 
> I am querying a table to check the condition of two fields
> (RAPSSubmitted and RAPSRNS). I just need to know if the fields are blank
> or not. Actual content is irrelevent.
> 
> I need four queries that catch each of the four possibilits (both
> populated, both empty, one populated, the other populated)
> 
> What I have is this (for example):
> 
> <cfquery name="GetRAPSSubmitted" datasource="Encounters">
>                 Select * from tblEncounters
>                 WHERE RAPSSubmitted <> ''
>                 AND RAPSRNS = ''
>                 AND SelectMonth = '#SelectMonth#'
>                 AND SelectYear = '#SelectYear#'
> </cfquery>
> 
> I have only listed one query for example sake. Bottom line, when I run
> all four queries, I do not come up with the total number of records in
> the database! Is there a fundamental problem with my technique of
> checking the four possibilites here?
> 
> TIA,
> Tim


-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:197012
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

Reply via email to