Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2005-10-28 : 14:44:51
|
| I am learning all the fuctions that deal with text data type. One of the samples from BOL lists here. My question is, what exactly is the pointer? I could get the same result from a substring(). I'd guess textptr() will boost the performance. My challenge is to dynamically find the position in the text string. textptr seems provide no help. It always points to the end of the string. USE pubsGODECLARE @ptrval varbinary(16)SELECT @ptrval = TEXTPTR(pr_info) FROM pub_info pr INNER JOIN publishers p ON pr.pub_id = p.pub_id AND p.pub_name = 'New Moon Books'READTEXT pub_info.pr_info @ptrval 1 25GOselect substring(pr_info, 2, 25) FROM pub_info pr INNER JOIN publishers p ON pr.pub_id = p.pub_id AND p.pub_name = 'New Moon Books' |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-10-28 : 14:53:26
|
| [d'oh]Books online perhaps?[/d'oh]Text data is not stored on the data pages with the rest of the data. The text pointer shows (I think) the physical location of the data on the disk.Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
|
|
|