guhan010 发表于 2009-07-01 18:22

sybase select text

现在我知道怎么读出来了,用readtext,不过还有一个疑问,我想把readtext的数据放入一个变量,怎么搞?大家帮忙啊。

[ 本帖最后由 guhan010 于 2009-7-2 11:38 编辑 ]

guhan010 发表于 2009-07-02 11:38

晕,没人理我啊。这个问题,大家是不是觉得很简单啊。帮个忙呗,我是sybase的新手啊。

chenfeng825 发表于 2009-07-02 13:30

呵呵,看到了readtext函数,往下一步就好了
transact-sql guide:
Examples of using text functions
This example uses the textptr function to locate the text column, copy, associated with title_id BU7832 in table blurbs. The text pointer, a 16-byte binary string, is put into a local variable, @val, and supplied as a parameter to the readtext command. readtext returns 5 bytes starting at the second byte, with an offset of 1.
declare @val binary(16)
select @val = textptr(copy) from blurbs
where au_id = "486-29-1786"
readtext blurbs.copy @val 1 5

guhan010 发表于 2009-07-02 13:36

谢谢楼上,可是我要把它读出来的数据放入一个变量,怎么放呢?没办法搞啊,我知道你说的方法的。
页: [1]
查看完整版本: sybase select text