having trouble w/ having clause...

having trouble w/ having clause...

Post by Mike Die » Fri, 10 May 2002 07:22:07



Hi all,

This is a simple question, but for the life of me, I can't see what is wrong with this query:

select host,slot,port,count(mac) as d from cam group by host,slot,port having d>1;

I'm running 7.2.

Thanx in advance,

--
Mike Diehl
Network Tools Devl.
Sandia Labs
(505) 284-3137

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

 
 
 

having trouble w/ having clause...

Post by Ian Barwi » Fri, 10 May 2002 08:52:36



Quote:> Hi all,

> This is a simple question, but for the life of me, I can't see what is
> wrong with this query:

> select host,slot,port,count(mac) as d from cam group by host,slot,port
> having d>1;

Try:

select host,slot,port,count(mac) as d from cam group by host,slot,port
having count(mac) > 1

See:

http://www.postgresql.org/idocs/index.php?sql-select.html

"output_name

 Specifies another name for an output column using the AS clause. This name is    
 primarily used to label the column for display. It can also be used to refer
 to the column's value in ORDER BY and GROUP BY clauses. But the output_name
 cannot be used in the WHERE or HAVING clauses; write out the expression
 instead."

HTH

Ian Barwick

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command


 
 
 

having trouble w/ having clause...

Post by Mike Die » Sat, 11 May 2002 04:09:48


Yep, this fixed it.  Thanx,



     > > Hi all,
     > >
     > > This is a simple question, but for the life of me, I can't see what
     > > is wrong with this query:
     > >
     > > select host,slot,port,count(mac) as d from cam group by
     > > host,slot,port having d>1;
     >
     > Try:
     >
     > select host,slot,port,count(mac) as d from cam group by host,slot,port
     > having count(mac) > 1
     >
     > See:
     >
     > http://www.postgresql.org/idocs/index.php?sql-select.html
     >
     > "output_name
     >
     >  Specifies another name for an output column using the AS clause. This
     > name is primarily used to label the column for display. It can also be
     > used to refer to the column's value in ORDER BY and GROUP BY clauses.
     > But the output_name cannot be used in the WHERE or HAVING clauses;
     > write out the expression instead."
     >
     > HTH
     >
     > Ian Barwick

--
Mike Diehl
Network Tools Devl.
Sandia Labs
(505) 284-3137

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

 
 
 

having trouble w/ having clause...

Post by Wolfgang.Fuertba.. » Tue, 14 May 2002 15:36:49



Quote:>Hi all,

>This is a simple question, but for the life of me, I can't see what is
wrong
>with this query:

>select host,slot,port,count(mac) as d from cam group by host,slot,port
having
>d>1;

try:
select host,slot,port,count(mac) as d from cam group by host,slot,port
having  count(mac) >1;
W

Quote:

>I'm running 7.2.

>Thanx in advance,

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

 
 
 

1. Still having trouble using Vuescan with old negatives

I am now scanning some color negative film taken in 1970.   It was
probably whatever the standard Kodak color daylight film was at that
time.   When I scan using sane/xsane under Linux, I use a histogram tool
which allows me to adjust both the lower and upper values for R,G, and B
separately as well as the gamma for each color.   I can also make similar
adjustments for the black/white (combination of all three).   xsane shows both
the raw histograms and the enhanced ones after adjustment.   The scan
works out best if I can get each of these to more or less fill the
available gamut.

I can't see how to do anything like this using Vuescan.    I can see how
to control the range of the histogram for black by fiddling with the
white point and black point.   I see how to control the overall gamma and
the gamma for each color by fiddling with the brightness controls.   But
when the black histogram is right, for example, the blue one falls far
short of the total range.  In sane/xsane, the raw blue range appears to
be quite narrow, unlike what is the case for recently exposed and
developed film.

According to help there are supposed to be separate white point and black
point controls for each color, but they don't seem to be available with
Vuescan 7.4.2, which I just downloaded today.

What am I missing?

--

Dept. of Mathematics, Northwestern Univ., Evanston, IL 60208

2. Matrix Multiplication Prog in Assembly for TMS320C40

3. VueScan settings I am having trouble with

4. Autodocs in Amigaguide format

5. Having trouble installing scanner- please help!!!

6. How to make the pretty colors?

7. Visioneer Paperport 6100 having trouble

8. next version of AppleWin

9. I am having trouble with an HP9591A

10. Novice having trouble

11. I'm having trouble with my Info scanner

12. Having a lot of trouble getting Gamma Correction right...

13. Having trouble with xbox not reading CD-R's or RW's