GlobaLevel
asked on
UPDATE ERROR - WITH MS SQL SERVER
I cant figure out whats wrong with this update statement...
declare @Resell_program table (TC_ID nvarchar(max), ind_1x_res_id nvarchar(max),ind_1x_res_p roduct nvarchar(max), ind_1x_res_current nvarchar(max),ind_1x_res_S UB_TOTAL nvarchar(max) ,ind_1x_res_TOTAL nvarchar(max))
insert into @Resell_program (TC_ID,ind_1x_res_id,ind_1 x_res_prod uct,ind_1x _res_curre nt,ind_1x_ res_SUB_TO TAL,ind_1x _res_TOTAL )
values ('TC_ID_SD9FJG3K','IR_1X_W EDR5T','PR O','YES',' ','')
SELECT * FROM @Resell_program
UPDATE RS
SET ind_1x_res_SUB_TOTAL CASE =
WHEN ind_1x_res_product = 'PRO' THEN '1'
WHEN ind_1x_res_product = 'H' THEN '8'
END
FROM @Resell_program RS
WHERE TC_ID = 'TC_ID_SD9FJG3K'
declare @Resell_program table (TC_ID nvarchar(max), ind_1x_res_id nvarchar(max),ind_1x_res_p
insert into @Resell_program (TC_ID,ind_1x_res_id,ind_1
values ('TC_ID_SD9FJG3K','IR_1X_W
SELECT * FROM @Resell_program
UPDATE RS
SET ind_1x_res_SUB_TOTAL CASE =
WHEN ind_1x_res_product = 'PRO' THEN '1'
WHEN ind_1x_res_product = 'H' THEN '8'
END
FROM @Resell_program RS
WHERE TC_ID = 'TC_ID_SD9FJG3K'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.