I have a table with date values:
+------------+
| theDate |
+------------+
| 2005-08-15 |
| 2005-08-16 |
| 2005-08-14 |
+------------+
I can execute this select statement on it:
select * from tDay where theDate > date_sub( now(), interval 1 day);
And I can create a view from it:
create view dateTest as select * from tDay where theDate >
date_sub( now(), interval 1 day);
On creating the view, the date_sub function is replaced by its result,
though, so that the view does not generate dynamic results:
show create table dateTest;
CREATE ALGORITHM=UNDEFINED VIEW `kurse`.`dateTest` AS select
sql_no_cache `kurse`.`tDay`.`theDate` AS `theDate` from
`kurse`.`tDay` where (`kurse`.`tDay`.`theDate` > 20050814)
How can I avoid this replacement and make this view a truly dynamic one?
s.m.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]