The weird thing is if I use that with my whole query which is

Select * From customerLeads
Where TodaysDate = '#DateFormat("TodaysDate", "mm/dd/yy")#'
And Email Like '%@%'
And Email Like '%.%'
And ContactCnt != 'Do Not Contact' Or ContactCnt is Null

It totally ignores the date part and grabs everything. This is very strange 
that it is doing this.

Ben


At 01:37 PM 4/18/2002, you wrote:
>Couldnt you use
>
>Where ContactCNT != 'Do Not Contact' OR ContactCNT is NULL
>
>HTH,
>Tim P.
>----- Original Message -----
>From: "Ben Densmore" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Thursday, April 18, 2002 1:06 PM
>Subject: using != in a filed with a null value
>
>
> > Can someone tell me if there is a better way to write a query than using
> > !=? I have a field in my database that stores info on how many times a
> > sales person has contacted a customer or if the customer ordered or if the
> > customer has requested to not be contacted. I am running a query that
>shows
> > this field but now want to change my query to only display customers that
> > either haven't been contacted or ones that haven't ordrered, so I added in
> > my query " Where ContactCNT != 'Do Not Contact'" which works, but if there
> > is a null value in my database field the query doesn't grab those either,
> > so if we had 100 people in our database for todays date and none of them
> > had been contacted, so the value in that field is "null" our system won't
> > show anything at all. Can someone tell me an alternative, if there is one
> > to writing the query this way? Would I be better off setting a default
> > value of 0 in the database field. I'm using SQL Server 7, just in case
> > someone asks.
> >
> > Thanks,
> > Ben
> >
> >
> >
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to