0

Hi, I am using this query for count SELECT Count(ID) from Table But its showing the count of all the fields which are empty and zeros. I want the count of fields which are empty and zero. please guide me.

Thanks.
Take care.

3
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by guru12
0
SELECT 
  info.SiteId ,
  info.Alias,
  info.Code,
  info.NewID,
  count(info.Longitude),
  count(info.Lat),
  info.Address,
  info.Region,
  info.City,
  info.District,
  info.MaintainedBy,
  info.StatusNopatPat,
  info.Ownership,
  info.StatusOnairOffair,
  info.OnAirDate,
  info.Rollout,
  info.Phase,
  info.Priority,
  info.DependentSites,
  info.GuardedUnguarded,
  info.GreenFieldRoofTop,
  info.IndoorOutdoor,
  info.HODate,
  info.Host,
  info.Guest,
  info.pdf
FROM
  info
  where info.Longitude is null or info.Longitude=""

It only show Empties and zeros values of longitude
how I show count for all fields.

0

Dear friend

You should use the "WHERE" condition

Like the below code

Select count(field name) where name=''

Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.