sp_select icon indicating copy to clipboard operation
sp_select copied to clipboard

varchar(max) and nvarchar(max) are not supported

Open FilipDeVos opened this issue 14 years ago • 0 comments

When using a varchar(max) or varchar(max) column a NULL value is returned

Repro script:

    create table #longstrings (id int, name varchar(max))
    insert into #longstrings values (1, cast(REPLICATE('X', 4000) as varchar(max)) + REPLICATE('Y', 4000))

    exec sp_select 'tempdb..#longstrings'
    -- returns NULL for the name column

    select * from #longstrings
    -- correctly returns the data.

FilipDeVos avatar Apr 21 '11 12:04 FilipDeVos