RE: IS NULL not working in WHERE clause.

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Earl Newcomer (EarlNewcomer_at_discussions.microsoft.com)
Date: 12/17/04


Date: Fri, 17 Dec 2004 14:37:05 -0800

Please see my return post to David Portas. The table I am having problems
with contains over 277 million rows. The same query running against a table
with only one day of data (approx. 659,000 rows) works just fine.

"Alejandro Mesa" wrote:

> How can we reproduce the problem?
>
>
>
> AMB
>
>
> "Earl" wrote:
>
> > The following query returns rows where the time_id IS NOT NULL. This query
> > seems to be breaking SQL Server(?)
> >
> > select bus_date, time_ordered, time_id
> > from [vicorp\gillic].pmix_fact1
> > where bus_date = '2003-11-01'
> > and time_id is null
> > order by time_ordered
> >
> >
> > The following query does NOT return any rows where the time_id is null.
> >
> > select bus_date, time_ordered, time_id
> > from [vicorp\gillic].pmix_fact1
> > where bus_date = '2003-11-01'
> > and time_ordered between '2003-10-31 00:05:54' and '2003-11-05 13:38:11'
> > and time_id is null
> > order by time_ordered
> >
> >



Relevant Pages

  • Re: mdf and log files on network attached storage?
    ... "David Portas" wrote: ... > Server is a separate backup process altogether and backup is configured ... not per server. ... > SQL Server MVP ...
    (microsoft.public.sqlserver.setup)
  • Re: Encrypting Stored Procedures question
    ... "David Portas" wrote: ... how do I keep protect my code? ... The best protection for your intellectual property is a licence agreement. ... the server as much as you like. ...
    (microsoft.public.sqlserver.server)
  • Write performance.
    ... We've got a SS 2000 system with two Raid 5 SAN (EMC) ... I have been doing copies from the old slower ... 5X more slowly with a simple SELECT query running in the ... that if you have anything else running on the server, ...
    (microsoft.public.sqlserver.server)
  • Re: Numbers of DB in SQL
    ... My server is a Dell 8450 Quad-processors with 2 ... GB of RAM. ... "David Portas" wrote: ...
    (microsoft.public.sqlserver.server)
  • Re: will sql 2000 install on server 2003 web edition
    ... will support server 2003 web version ... "David Portas" wrote: ... > Only SQL Server MSDE is supported on web edition. ...
    (microsoft.public.sqlserver.setup)