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)
 Stored Prodecure - I need to Process a Varchar Variable length more than 8000 chrs

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-14 : 11:56:50
Palanivel writes "
I want to process a variable of varchar type which exceeds the varchar limit of 8000 chrs. It is noted that We can't use Text Type in procedure's parameter list and in declare section.

I shall give you my real problem.

Table1 with structure 'ID int and Name varchar(10)' has more than 4000 rows.

Table1
------
ID Name
-- ----
1 ABCFE
2 DEF
3 BCATB
4 RTYXXT
. ...
. ....
. ....
> 4000

In a procedure, i am manipulating a string for the selected IDs from the above table in the following format.

myVariable = "$1$$2$$3$$4....4000$"

And returning the same variable to the calling program. The calling program can be an ASP OR a Database Trigger.

Previously I used

@@myVariable VARCHAR(8000) OUTPUT

@mTMPvariable VARCHAR(8000)

in my Stored Procedure. Now the string exceeds 8000 chrs and the system truncates the string to 8000 chrs.


So, Is there a way to Use TEXT datatype in the declaration part of Stored Procedures and Triggers. (In ASP, There is no problem) ?

or

any other solution?

I can't go for any another option other than returning a string. Because i use this string in my ASP codes and Triggers.(These are actually the calling Programs).



Thanking You.

Regards,
palanivel"
   

- Advertisement -