Thread

  1. WHERE vs HAVING

    Jan Wieck <jwieck@debis.com> — 1999-05-12T17:51:18Z

        Planner guru's please!
    
        I  wonder  what makes the difference between WHERE and HAVING
        that causes HAVING to accept aggregates while WHERE  doesn't.
        It  would  be  extremely nice if it's possible to teach WHERE
        how to handle aggregates properly. Having to push  them  into
        subselects during rewrite if a views aggregate column appears
        in the WHERE clause is a total mess.
    
    
    Jan
    
    --
    
    #======================================================================#
    # It's easier to get forgiveness for being wrong than for being right. #
    # Let's break this rule - forgive me.                                  #
    #======================================== jwieck@debis.com (Jan Wieck) #
    
    
    
    
  2. Re: [HACKERS] WHERE vs HAVING

    Bruce Momjian <maillist@candle.pha.pa.us> — 1999-07-07T03:40:33Z

    >     Planner guru's please!
    > 
    >     I  wonder  what makes the difference between WHERE and HAVING
    >     that causes HAVING to accept aggregates while WHERE  doesn't.
    >     It  would  be  extremely nice if it's possible to teach WHERE
    >     how to handle aggregates properly. Having to push  them  into
    >     subselects during rewrite if a views aggregate column appears
    >     in the WHERE clause is a total mess.
    
    SQL requires the restriction.
    
    -- 
      Bruce Momjian                        |  http://www.op.net/~candle
      maillist@candle.pha.pa.us            |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026