[V4RB 0003228]: SQL - Numeric values with more than 1 digit aren't found if beginning with zeroes

Ernesto Giannotta ernestogiannotta at tiscalinet.it
Tue Aug 19 01:07:40 CDT 2008


Hi Ivan,

how so?

literals beginning with a 0 are treated as octals?
Is this documented Sql standard? What if I should want it as an hex?

Thanks for listening

On 16-ago-08, at 13:02, Mantis Bug Tracker wrote:

>
> The following issue has been CLOSED
> ======================================================================
> http://www.valentina-db.com/bt/view.php?id=3228
> ======================================================================
> Reported By:                erne
> Assigned To:
> ======================================================================
> Project:                    V4RB
> Issue ID:                   3228
> Category:                   SQL
> Reproducibility:            always
> Severity:                   minor
> Priority:                   normal
> Status:                     closed
> Resolution:                 open
> Fixed in Version:
> ======================================================================
> Date Submitted:             2008-06-16 01:57 PDT
> Last Modified:              2008-08-16 04:02 PDT
> ======================================================================
> Summary:                    SQL - Numeric values with more than 1  
> digit aren't
> found if beginning with zeroes
> Description:
> I've made some test and found that a query like this:
>
> 	Select RecID, * from TestBo Where UlongTest = 01
>
> works fine
>
> but this:
>
> 	Select RecID, * from TestBo Where UlongTest = 011
>
> does not work!
>
> I've tested this with ULong, ULLong and UShort fields, all same  
> behaviour
>
> In other words if the searched value is more than 1 digit trailing  
> 0's are
> no more ignored by the SQL parser.
>
>
> ======================================================================
>
> ----------------------------------------------------------------------
> (0003570) ivan (developer) - 2008-06-18 23:28
> http://www.valentina-db.com/bt/view.php?id=3228#3570
> ----------------------------------------------------------------------
> Actually it is treated as octal value.
> You can easy check it with "select 011" - result is 9.
>
> Issue History
> Date Modified    Username       Field                    Change
> ======================================================================
> 2008-06-16 01:57 erne           New Issue
> 2008-06-16 01:57 erne           File Added: UlongTest
> 2008-06-18 23:28 ivan           Note Added: 0003570
> 2008-08-16 04:02 ivan           Status                   new => closed
> ======================================================================

Cool Runnings,
Erne.



More information about the Valentina mailing list