NULL = NULL not working

From: we7313 (we7313_at_discussions.microsoft.com)
Date: 12/04/04

  • Next message: Hugo Kornelis: "Re: NULL = NULL not working"
    Date: Sat, 4 Dec 2004 15:53:05 -0800
    
    

    I have a proc that can specify a price range if its passed in.
    my and where clause looks like this:

    where ((PriceViewHotelPrice.price + PriceViewAirPrice.price)between 500 and
    600) or(NULL = NULL))

    I have removed the parameters & replaced them with the values passed in
    running it through Sql Analyzer & have confirmed the problem.
    If I replace NULL = NULL with 'a' = 'a' it works fine. Does anyone see the
    problem with this?

    -- 
    will
    

  • Next message: Hugo Kornelis: "Re: NULL = NULL not working"

    Relevant Pages

    • Re: NULL = NULL not working
      ... >>I have a proc that can specify a price range if its passed in. ... Think of NULL as an unknown value. ...
      (microsoft.public.sqlserver.mseq)
    • Re: question about sql update
      ... You can also specify the sourceColumn in the Parameter constructor ... your function which builds the parameters and calls the proc. ... your default values before calling the Set in your proc b/c the 'default' ... but you may want to check out his book if you have some time b/c ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: How do the records retrieve from data base when using sql statements?
      ... Just use an order by clause. ... guaranteed to be returned in the correct order in you don't specify an order ... SQL statement. ... This means that the keys are located continuously and every "insert" ...
      (comp.sys.ibm.as400.misc)
    • Re: Create table and default order by clause
      ... by" clause to use when no "order by" clause is specified in a "select" query ... the only way to guarantee result order is to specify ORDER BY in the SELECT statement that selects from the table. ... Note that it is likely, but not guaranteed, that you will get results ordered in sequence by the table's clustered index in a trivial query with no joins or where clause. ...
      (comp.databases.ms-sqlserver)
    • Re: Using a Select Query to build a MDB table from a Fox table
      ... MS Access has a 'make-table' query with IN clause you can specify ... As you said the IN <database> clause is specific to Access SQL. ...
      (microsoft.public.fox.helpwanted)