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)
 creating long character field to insert into file

Author  Topic 

mikejohnson
Posting Yak Master

153 Posts

Posted - 2004-12-13 : 11:42:48
i'm creating a long value in a stored procedure to enter into a file. however, i can't guarantee the value will be small enough to always fit into the varchar datatype. and when trying to use text, i get an error saying text is not valid for local variables. what are my options?

nr
SQLTeam MVY

12543 Posts

Posted - 2004-12-13 : 12:10:31
You can create a temp table with a text datatype column and insert a single row then use that as your variable.
You will have to use updatetext to manipulate it though.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-12-13 : 12:33:44
Create as many varchar(8000) rows as you need and break it up?

Brett

8-)
Go to Top of Page
   

- Advertisement -