This content has been marked as final.
Show 4 replies
-
1. Re: SQL Search for range of money
bregent Feb 21, 2010 9:49 AM (in response to Mike_Watt)For the queries that test for a range of values you would use the Between predicate:
Select * From MyTable where MyColumn between 0 and 99
Your script would need to evaluate the search term passed in and then convert that to the range value. You could easily parse the text value to obtain the two numeric values on each side of the "-" dash. Or just use an if/else condition.
-
2. Re: SQL Search for range of money
Mike_Watt Feb 21, 2010 10:00 AM (in response to bregent)I'll give that a shot and report back... thanks!
-
3. Re: SQL Search for range of money
David_Powers Feb 21, 2010 11:49 AM (in response to Mike_Watt)Mike_Watt wrote:
The db column is DECIMAL (7,2)
You don't say which database you're using, but you should be aware that DECIMAL in older versions of MySQL is NOT a numerical datatype. It's a string. It's only since MySQL 5.0.3 that it is treated as a numerical datatype.
-
4. Re: SQL Search for range of money
Mike_Watt Feb 21, 2010 3:15 PM (in response to David_Powers)Server version: 5.0.67.d7-ourdelta-log




