Re: Sub Count -- Correction

2001-11-12 Thread Bill Adams
In the select statement, MySQL returns 1 for true so: SELECT LOCATION_T.ADDRESS, LOCATION_T.CITY, COUNT(DISTINCT HARDWARE_T.IP), COUNT(DISTINCT HARDWARE_T.SLOT), COUNT(DISTINCT HARDWARE_T.PORT), - SUM( HARDWARE_T.PORT_STATUS = 'up' ) AS up_cnt, SUM( HARDWARE_T.PORT_STATUS = 'down' ) a

Sub Count -- Correction

2001-11-12 Thread Bradley
Sorry, for some reason, the select statement was cut off. Here is the complete statement (below): Thanks, Brad I'm trying to write a select statement that produces a SUB COUNT of column PORT_STATUS where (A) PORT_STATUS = 'up' and (B) PORT_STATUS = 'down'. I'd like to do this in one statment wit