how to execute a SP which has a input parameter of type varchar(max)?

  • I want to execute a SP which has a parameter of type varchar(max). When I right click SP and say execute, it asks for parameters. I have a string of lenght 4000 characters which i want to pass in that parameter.But when I copy and paste that string in that parameter, it gets truncated to very few characters.

    Is there any other way of executing and testing such procedures which have varchar(max) type as input parameter?

  • For example

    DECLARE @p VARCHAR(max)

    SET @p = .....

    EXEC your_stored_proc @p

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply