Forums
This topic is locked
Help with select count
Posted 09 Mar 2005 11:07:23
1
has voted
09 Mar 2005 11:07:23 Jaime Romo posted:
whats wrong with this"SELECT COUNT (*) as totales FROM smaDBnegocios WHERE categoria LIKE '" + Replace(conteo__MMColParam, "'", "''" + "%' AND controlador = '1' GROUP BY categoria"
IT DOES NOT RETURN ME THE VALUE AND WHEN I APLY A REPEAT REGION IT REPEATS THE FIRST RESULT.... IT DOES NOT PUT THE VALUE TO EACH RECORD.????
THANKS
Visit my home page
www.cancuncoral.com
Replies
Replied 09 Mar 2005 11:56:42
09 Mar 2005 11:56:42 Simon Martin replied:
COUNT returns the number of occurences in total for the given column. So COUNT(*) will tell you how many records there are that match the criteria, and it will be a single value.
What are you trying to achieve with your SELECT statement? Maybe we can think of an alternative solution for you
Live the life you love
Love the life you live
~ ~ ~ ~ ~ ~ ~
<b>Simon Martin</b> - <i>DMXzone Manager</i>
<font size=1>[ Dreamweaver MX/MX2004 | ASP | SQL | XHTML/CSS | Web Accessibility ] </font id=size1>
What are you trying to achieve with your SELECT statement? Maybe we can think of an alternative solution for you
Live the life you love
Love the life you live
~ ~ ~ ~ ~ ~ ~
<b>Simon Martin</b> - <i>DMXzone Manager</i>
<font size=1>[ Dreamweaver MX/MX2004 | ASP | SQL | XHTML/CSS | Web Accessibility ] </font id=size1>