Skip to Content.
Sympa Menu

freetds - New token description (0x88 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: freetds AT franklin.oit.unc.edu
  • Subject: New token description (0x88 Compute Format description)
  • Date: Thu, 10 Aug 2000 11:29:34 -0400 (EDT)



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:

+------+-------+---+----+
| 136 | #cols | compid | ...
+------+-------+---+----+

|-------------------------- Repeat for each column
----------------------------|+----+----+ +----+----+
+--------+---+---+----+-----+--+--+------+-----+----+
| #bycols |..| bycol# |..| optype | opcol | usertype | ??? | type | 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.
unknown: always seems to be one byte [ 0x00 ]

I think I also figured out some additional fields of the TDS 5.0
compute format token as well, I'll pass those on later.

-scott

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




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

Archive powered by MHonArc 2.6.24.

Top of Page