Skip to Content.
Sympa Menu

freetds - Re: New token description (0x81 Compute Format description)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Scott C. Gray" <gray AT voicenet.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: New token description (0x81 Compute Format description)
  • Date: Thu, 10 Aug 2000 13:35:38 -0400 (EDT)


On Thu, 10 Aug 2000, Scott C. Gray wrote:

>
> I lost the owner and URL of the person keeping track of the
> latest TDS specifications, but I have one to add that I have
> been hacking on.
>
> This is the TDS 7.0 compute format (136/0x81) description column:

Sorry, I was a little hasty...the following seems a bit more
correct...

+------+---+---+--------+----+----+ +----+---+
| 136 | #cols | compid | #bycols |..| bycol# |...
+------+---+---+--------+----+----+ +----+---+
^
+--- Repeat for each BY column

Repeat for each compute column
+--------+---+---+----+-----+--+--+------+-----+------+---------+
| optype | opcol | usertype | ??? | type | len | ?len | ??????? |
+--------+---+---+----+-----+--+--+------+-----+------+---------+

#cols: Number of columns in compute result
compid: id number of compute clause. Each compute clause in your
select statement has an increasing id number.
#bycols: Number of columns in the BY clause
bycol#: Column # of column in BY clause. This is repeated #bycols
times in data stream
optype: 75 = COUNT(*)
77 = SUM(...)
79 = AVG(...)
81 = MIN(...)
82 = MAX(...)
opcol: column being computed
usertype: user type number
unknown: 2 unknown bytes [ 0x01 0x00 ]
type: TDS datatype
len: maxlength of datatype. The size of this fields varies
upon the datatype between 0 and 4 bytes.
?len: one byte indicating length of following data
??????: Unknown data (suspect it may have something to do with locale?)

-scott

--
Scott C. Gray <gray AT voicenet.com> "my keybard is brken"
http://www.voicenet.com/~gray/sqsh.html




  • Re: New token description (0x81 Compute Format description), Scott C. Gray, 08/10/2000

Archive powered by MHonArc 2.6.24.

Top of Page