[snip]
SET @sql=CONCAT('SELECT SUM(IF(SUBSTRING(updated,1,10)=CURDATE(), 1, 0)) AS ',
                char(39),
                CURDATE(),
                CHAR(39),
                ' FROM tablename GROUP BY group by psDealer' );
PREPARE stmt FROM @sql;
[/snip]

Very clever Peter! Thanks for your help on this.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to