ok... you might have two options: 1- (don't know if this will work) do a min(cast(Value * 1000000 as signed integer) / 1000000
2- or min(Value + 0.0) and see what happens. > -----Original Message----- > From: Eldon Ziegler [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 13, 2004 11:24 AM > To: [EMAIL PROTECTED] > Subject: RE: MIN with negative numbers in VARCHAR > > > DOUBLE doesn't seem to be an option with CAST > > At 10:31 am 1/13/2004, you wrote: > >Could you CAST them first, then apply MIN? > > > > > -----Original Message----- > > > From: Eldon Ziegler [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, January 13, 2004 9:56 AM > > > To: [EMAIL PROTECTED] > > > Subject: MIN with negative numbers in VARCHAR > > > > > > > > > We have a table with floating point measurement values stored > > > in VARCHAR's. > > > How can I get MIN in SELECT to evaluate these as numbers > > > instead of strings > > > so negative value sort correctly? Right now I've kludged it as > > > MIN(SIGN(Value) * ABS(Value)). Is there a more straight > forward way? > > > > > > > > > -- > > > MySQL General Mailing List > > > For list archives: http://lists.mysql.com/mysql > > > To unsubscribe: > > > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > > > > >-- > >MySQL General Mailing List > >For list archives: http://lists.mysql.com/mysql > >To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]