Need to count values when a column contains 2 possible values. Stored Procedure
Posted on 2008-06-18
I have a column whose value can be either 'R' or 'O' indicating owneres and renters.
I need a sql statement that returns the total number of renters and owners in an 'Renters' column and
Select from tablename
Count(Where fieldname value='O') as Owners,
Count(Where fieldname value='R') as Renters
What is the syntax?