SQL Server Performance

Define a long variable, its size might exceed 8,000 bytes

Discussion in 'General Developer Questions' started by zhshqzyc, Sep 8, 2008.

  1. zhshqzyc New Member

    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?
  2. MohammedU New Member

    In sql 2000 only the option would be using multiple variables of 8000 characters/bytes...
  3. zhshqzyc New Member

    It's hard.
    I don't know how many multiple variables will be used.
  4. Madhivanan Moderator

    [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?

Share This Page