Count(*) with additional query
Posted in 2000
Topics: SQL Development & Query Writing
I would like to count rows when I do a select
statement for specific columns, but count(*) does
not like that:
select count(*),
propertyname,
objectid
from properties
where propertyname='SITENAME'
I would prefer not to, but do I have to put these
into separate select statements?
select count(*)
from properties
where propertyname='SITENAME'
select propertyname,
objectid
from properties
where propertyname='SITENAME'
Sent via Deja.com http://www.deja.com/
Before you buy.
Try Goup by Propertyname
<mrs_staceysmith@my-deja.com> wrote in message
news:8h206f$23g$1@nnrp2.deja.com...
> I would like to count rows when I do a select
> statement for specific columns, but count(*) does
> not like that:
>
> select count(*),
> propertyname,
> objectid
> from properties
> where propertyname='SITENAME'>
> I would prefer not to, but do I have to put these
> into separate select statements?
>
> select count(*)
> from properties
> where propertyname='SITENAME'>
> select propertyname,
> objectid
> from properties
> where propertyname='SITENAME'>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.