I have a procedure with following code
CREATE PROCEDURE customer_panel_insert(
@Panel_Name VARCHAR(200),
@Panel_description VARCHAR(5000),
@Type_of_change CHAR(5))
AS
DECLARE @data_set VARCHAR(MAX);
DECLARE @sql VARCHAR(MAX);
begin
set @sql = 'select * from customer_details where panel_type = 1 AND PANEL_DATATYPE = ''VARCHAR'''
exec @sql
END
I want to change the varchar
datatype to nvarchar
and char
to nchar
. Change the varchar
variable with size more than 4000 characters to NVARCHAR(MAX)
. I want to change with help of a query.
Is there any query that can replace