List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:September 10 2001 4:09pm
Subject:Re: Simple select problem.
View as plain text  
How about
SELECT @last:=MAX(Date + 0) from stat;

Eyal Rif wrote:

> Hi,
> 
> I have a table with the format of : 
> 
> char(20),int(7),char(32)
> 
> the "Date char(20)" contents in actually a number(seconds since 1970) -
> 
> I want to use a "select" query that will give the max value according to
> number value of that column.
> 
> select @last:=MAX(Date) from stat1;
> 
> What I need to know is how to convert a string to a number on a select
> statement.
> 
> Any help/reference will be appreciated
> 
> Thanks,
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread85060@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
Simple select problem.Eyal Rif9 Sep
  • Re: Simple select problem.Gerald Clark10 Sep
  • Re: Simple select problem.Paul DuBois10 Sep