Skip to Content.
Sympa Menu

freetds - Re: killer query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: killer query
  • Date: Fri, 21 Jun 2002 16:15:44 -0400


> From: Brian Bruns [mailto:camber AT ais.org]
> Sent: June 21, 2002 3:40 PM
>
> Are these nullable or
> non-nullable bits? (nullable bits are a TDS 7 invention).

I re-ran it thus:

create table #all_types
( _bit bit NOT NULL
[etc.]

1> select 'bit' as type, _bit from #all_types
2> go
type _bit
---- ----
bit 1

(1 row affected)
1> select cast(NULL as bit)
2> go
Unknown marker: 0!!

-

It looks like null bits are back and biting with 7.0. :(


> I'm assuming this was run under TDS 7? we should test 4.2 as well.

Correct. Under 4.2 bits work:

1> select cast(NULL as bit), cast(1 as bit), _bit from #all_types
2> go
_bit
- - ----
0 1 1

(1 row affected)

Varbinaries work, and uniqueidentifiers return garbage:

1> select 'varbinary' as type, _varbinary from #all_types[24]
spquant.Compustat.2> go
type _varbinary
--------- ------------------
varbinary 0x3230313230333034

(1 row affected)

1> select 'uniqueidentifier' as type, _uniqueidentifier from #all_types
[23] spquant.Compustat.2> go

type _uniqueidentifier
----------------- ----------------------------------
uniqueidentifier 0x49/"5f+/**)!.&11,*670004+,/#)+0#

(1 row affected)

I've never had a uniqueidentifier be so angry with me before. ;)

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page