I have a simple SP that is selecting rows based on a date range using parameters. I've tried several permutations that all return 0 rows.
The select statement looks like this: select * from 'mit_log'.'mitlog' where StartDateTime between '2005-04-01' and '2005-04-07' and returns over 300,000 rows. The SP looks like this: ----------------------------------------------------------------------------------------------------------------- DELIMITER $$ DROP PROCEDURE IF EXISTS `mit_logs`.`spPatientsLikeUsersByDate`$$ Create procedure `mit_logs`.`spUsingDateRange`(begDate datetime, endDate datetime) BEGIN SELECT * FROM mitlog WHERE (mitlog.StartDateTime between @begDate And @endDate); END$$ ----------------------------------------------------------------------------------------------------------------- and compiles ok. The calling statement looks like this: call spPatientsLikeUsersByDate ('2005-04-01','2005-04-07') Like I said, I've tried several guesses at syntax with no luck. When I take out the parameters and hard code the dates, it works. Any ideas? Thanks in advance, Kent in Montana -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]