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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Full-Text Indexing

Author  Topic 

johns
Starting Member

24 Posts

Posted - 2003-06-02 : 21:13:20
In SQL Server 2000 for large character text insertions (10,000+ characters) is there another way of handling these situations besides Full-Text Indexing?

Thanks,

John S.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-06-02 : 22:04:24
No, text and ntext columns cannot be indexed normally, only full-text indexed. The only other comparison available on these datatypes is LIKE or PatIndex(); Books Online details these further if you plan to use them.

Go to Top of Page

johns
Starting Member

24 Posts

Posted - 2003-06-03 : 08:07:06
Thanks! I am trying to figure a way to efficiently handle text documents of all different sizes (4,000 - 20,000). I have been reading Books Online and SQL Server 2000 Programming trying to get a grip on this before jumping into the code.

It appears I can use INSERT & UPDATE to insert and modify text data. Use READTEXT if I only want a pull out a small chunk of data. I can also use WRITETEXT for updates as well. I can CAST TEXT to VARCHAR, but only the first 8000 characters. Is all this correct?

Thanks,

John S.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-06-03 : 08:20:22
Yes.

If you're dealing with Word or PDF documents, and you intend to store them in the database (not recommended), then you must store them in an image column as they contain binary characters which would either not be stored in a text/ntext column, or would corrupt the rest of the data in the column.

The only good reason to store documents (actual files) in a SQL Server database is if you want to take advantage of full-text indexing. Even then, you can still keep the text files as regular files on disk and only store the path in your SQL Server tables. The MS Indexing Service can index the files in the same manner as full-text indexing, and you can query the Indexing service via a linked server. Additionally, you'll save some disk space and can be more flexible in where files are actually stored vs. storing them in the database itself.

Go to Top of Page
   

- Advertisement -