At 12:48 -0600 12/27/05, Jay Paulson \(CE CEN\) wrote:
I have a strange question for you all. I've inherated some code and
the way the code works is that I can only mess with the WHERE part
of a query. Therefore, I was wondering if something like this would
be possible.
WHERE where concat(year,period,week) as type int < 2007031
Note that I'm trying to change the type of what the concat() is
doing. Is this even possible? If so is it possible to do it in the
WHERE?
The reason why I think I need to do this is that 'period' is a
char(2). I have to have the leading zero for every entry into the
database so I can run my less than compare to it. Is there a better
way of doing this than having the 'period' a char(2) type and trying
to make whole concat() a type of int() on the fly?
Thanks!
You might be able to use the CAST() function.
http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]