|
Should be right
CREATE PROCEDURE GetDisplayNameByBatchAttibuteValues
(
@ListItemValue varchar (8000),
@ListDisplayName varchar (8000) output
)
AS
begin
declare @str varchar (8000)
declare @tb table (a int)
while charindex (',', @ ListItemValue)> 0
begin
insert @tb values (cast (left (@ ListItemValue, charindex (',', @ ListItemValue) -1) as int))
set @ListItemValue = stuff (@ListItemValue, 1, charindex (',', @ ListItemValue), '')
end
insert @tb values (@ListItemValue)
set @str = ''
select @str = @str + ',' + ListDisplayName from ProductAttributeLookupListItems where ListItemValue in (select a from @tb)
set @ ListDisplayName = stuff (@ str, 1,1, '')
end
GO
But no result is returned, it is very strange |
|