List:General Discussion« Previous MessageNext Message »
From:Chris W Date:September 28 2006 6:36pm
Subject:Re: making varchar field to act like numeric field
View as plain text  
Rajesh Mehrotra wrote:
> Hi Steve,
>
> Correction:
>
> Use: "select * from table where field1 like '4%' or like '5%' or like
> '6%' or field1 like '7%';" 
>   

This would not have the desired result as it would return things like 
500 or 50 or 5,000,000 etc.  You must use the cast as another reply 
suggested.  However I'm unclear as to why you would store numeric data 
in a var char field.  If at all possible it would be better to store it 
in a numeric field.

-- 
Chris W
KE5GIX

Gift Giving Made Easy
Get the gifts you want & 
give the gifts they want
One stop wish list for any gift, 
from anywhere, for any occasion!
http://thewishzone.com

Thread
making varchar field to act like numeric fieldsteve28 Sep
  • RE: making varchar field to act like numeric fieldRajesh Mehrotra28 Sep
  • Re: making varchar field to act like numeric fieldDouglas Sims28 Sep
    • Re: making varchar field to act like numeric fieldSteve Musumeche28 Sep
      • Re: making varchar field to act like numeric fieldDan Nelson28 Sep
        • Re: making varchar field to act like numeric fieldSteve Musumeche28 Sep
RE: making varchar field to act like numeric fieldRajesh Mehrotra28 Sep
  • Partitioning to_hourMichael Gargiullo28 Sep
  • Re: making varchar field to act like numeric fieldChris W28 Sep