I tried your code in mysql but receive following Error.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @Date DATETIME
SET @Date = '1/1/1900'
WHILE @Date '1/1/2100' at line 1
Thank You...For Your Time
Keep Up with TechRepublic