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
 Transact-SQL (2000)
 stored procedure....

Author  Topic 

shanly
Starting Member

17 Posts

Posted - 2005-12-28 : 23:18:34
Hi,
I wrote a stored procedure to concatinate multiple records in one field of data type - text. the procedure i wrote is shown below, one input paramater and one output parameter. the output parameter is text. I need to use this datatype as the output result is too large.

create proc test
(
@id int,
@@res text output
)
as
set @@res = ''
select @@res = @@res + Ltrim(rtrim(convert(char(20),box_number))) from customer where customer_id = @id
return

but i receive the error below.


Server: Msg 409, Level 16, State 1, Procedure test, Line 7
The assignment operator operation cannot take a text data type as an argument.
Server: Msg 403, Level 16, State 1, Procedure test, Line 8
Invalid operator for data type. Operator equals add, type equals text.


Please help me in this to solve my problem....

shallu1_gupta
Constraint Violating Yak Guru

394 Posts

Posted - 2005-12-28 : 23:25:59
cross post
http://sqlteam.com/forums/topic.asp?TOPIC_ID=59603
Go to Top of Page

shanly
Starting Member

17 Posts

Posted - 2005-12-28 : 23:49:51
yea it is same, but i did not get a correct answer...
Go to Top of Page
   

- Advertisement -