Groups | Blog | Home
all groups > sql server programming > january 2004 >

sql server programming : How to handle Text Columns in Stored Procedures?


Bob McCormick
1/19/2004 10:51:05 PM
Well, I just found out there that I can't declare a varialbe as type text. That kinda took me by surprise. What is the preferred/best case on how to handle this?

I've got several fields in various tables of type 'text'. Do I simply declare a variable as varchar and put a super huge length on it?

Like:

DECLARE @Instructions varchar(15000);

Would appreciate anyone chiming in here to discuss the best way to do this.

Thanks...Bob

Bob McCormick
XebraTech

Bob McCormick
1/20/2004 1:51:06 AM
OK - thanks for the BOL tip.

Found out about the 8000 limit after I wrote the first message. Heh. Fun..fun!

Roji. P. Thomas
1/20/2004 12:41:22 PM
Look for ReadText and UpdateText in BOL

[quoted text, click to view]
The max allowed size of a varchar variable is 8000

--
Roji. P. Thomas
SQL Server Programmer
--------------------------------------
[quoted text, click to view]
That kinda took me by surprise. What is the preferred/best case on how to
handle this?
[quoted text, click to view]

Bhaskaran.B
1/20/2004 3:44:22 PM
I think u are using TEXT/IMAGE in the WHERE clause, it's a limitation.

If u don;t need the field like TEXT, u could change it to
varchar(8000).

BJ.Bhaskaran.B.
SCT



[quoted text, click to view]
That kinda took me by surprise. What is the preferred/best case on how to
handle this?
[quoted text, click to view]

AddThis Social Bookmark Button