i need to query my database and count how many email addresses are in a table. i tried to do this already but i dont think its working properly! i have a database called "Lifestyles" with a table in it called "Customer" and in that table there is a row called "email" that i want to count how many email addresses are in it. can someone help me with the scripting? this is what i have right now:
SELECT COUNT(email) FROM Customer
at a glance well thats seems fine, why makes u say the count isnt correct ?
reg kevin
i deleted the only field with an email address in it and it still gave me 1 as the answer! i think it might be counting the field itself!
What do you mean "deleted the field"?
If you blanked it out, it will still be counted. If you set it to NULL there's something else wrong. What happens with this:
select * from Customer where email is not null
i will try that. when i say deleted it means i deleted the record! there was no record in there with an email field or any field for that matter and it still returned a 1!