Hi, How can I define a long variable? But for my case the variable's size might exceed 8,000 bytes. Please don't use varchar(max) since I am using sql server 2000. My original code isdeclare @x Varchar(8000) Set @x = '' Select @x = @x +DESCR+' ' from MERCHANDISE Where DESCR Like '%'+upper('TV')+'%' Can you please give me an example?
[quote user="zhshqzyc"] It's hard. I don't know how many multiple variables will be used. [/quote] What do you want to do with concatenated values?