Skip to Content.
Sympa Menu

freetds - Strange conversion

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "Freetds (E-mail)" <freetds AT franklin.metalab.unc.edu>
  • Subject: Strange conversion
  • Date: Mon, 5 Aug 2002 12:20:22 +0200


I do some query on sql analizer to do some test.
What's the behaviour of Sybase ?

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?

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page