Re: Unknown Error '0' when using BETWEEN in a SQL statement
Posted in 1994
Topics: General Discussion
In article <313qa3$fsu@gagme.wwa.com>, John T. Fontanilla <john@gagme.wwa.com> wrote: > > SOLUTIONS I TRIED: > 1. Select * from ship_info where (bale >= 1500000 and bale <= 3000000) > 2. Select * from ship_info where (bale between "1500000" and "3000000") > > PROBLEMS WITH THE TWO STATEMENTS ABOVE: > I get the Unknown error '0' (yes zero). I'm not sure if it's > a syntax problem or something. I read the manual and it says > there ... [expr] and [expr]. > Thanks to those who responded (Robert Minter, Paul Pryor, Ajay Sabhlok, an another one [ sorry forgot your name, mail deleted already ]). The problem was *SOLVED*. What I should've did was: 1. Select * from ship_info where ((bale + 0) between 1500000 and 3000000) ^^^^^^^^^^ or 2. Select * from ship_info where (bale + 0) >= 1500000 and (bale + 0) <= 3000000 ^^^^^^^^^^ ^^^^^^^^^^ The trick there was (bale + 0). Forced the comparison to integer instead of char. Thanks again! John