DECLARE @refCodeitems VARCHAR(800),
SELECT @refCodeitems=ISNULL(@refCodeitems,'')+refCodeitem +'/' from (SELECT refCodeitem from imatdocitem where DocCode ='XC00017802')as tSELECT @refCodeitems