Re: Simple select problem.

2001-09-10 Thread Gerald Clark

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 [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
[EMAIL PROTECTED]


-
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 [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Simple select problem.

2001-09-09 Thread Eyal Rif

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 [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php