Subject | Re: [firebird-support] Re: Help with strange answer in WHERE clause |
---|---|
Author | Arno Brinkman |
Post date | 2004-05-03T21:51:51Z |
Hi,
Subject: [firebird-support] Re: Help with strange answer in WHERE clause
'00250'
'00999'
'01000'
SELECT Count(*) FROM TableX WHERE <= '01000'
will return all three example above.
May be it's better to ask yourself if it isn't possible to use only numbers.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
Subject: [firebird-support] Re: Help with strange answer in WHERE clause
> Thank you. The problem is that the field might also have letters, soYou could leftpad your numbers with zeros, that's how i do it.
> I will have to use a single comparison instead of a range.
> Thanks again.
'00250'
'00999'
'01000'
SELECT Count(*) FROM TableX WHERE <= '01000'
will return all three example above.
May be it's better to ask yourself if it isn't possible to use only numbers.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81