Skip to Content.
Sympa Menu

freetds - Re: Strange conversion

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: "TDS Development Group" <freetds AT franklin.metalab.unc.edu>
  • Cc: Frediano.Ziglio AT vodafoneomnitel.it
  • Subject: Re: Strange conversion
  • Date: Mon, 5 Aug 2002 19:21:22 -0400


On Mon, 5 Aug 2002 12:20:22 +0200 , ZIGLIO Frediano
<Frediano.Ziglio AT vodafoneomnitel.it> wrote:

> select convert(int ,' - 13 ')
> -- -13
> select convert(bit ,'0 ')
> -- 0
> select convert(bit ,'134 ')
> -- 1
> select convert(int ,' + 13 ')
> -- 13
> select convert(bit ,' 0 ')
> -- error
>
> I do some other conversion test with ODBC and BIT and I got strangely
> this result
> 12 -> error (out of range)
> 1 -> 1
> -1 -> error (out of range)
> '1' -> 1
> ' 1 ' -> 1 (strip leading and trailing spaces too)
>
> Someone can test with Sybase+ctlib original libraries?

1> select convert(int ,' - 13 ')
, convert(bit ,'0 ')
, convert(bit ,'134 ')
, convert(int ,' + 13 ')
, convert(bit ,' 0 ')
go2> 3> 4> 5> 6>

----------- - - ----------- -
-13 0 1 13 0

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page