Hi,
Check the below Answer.... I think It will helps you. Because the problem is XML Conversion.
you need to use FOR XML PATH with TYPE Conversion as belwo.
IF OBJECT_ID('TempDB..#Test') IS NOT NULL DROP TABLE #Test
CREATE TABLE #Test (ID INT, Name VARCHAR(30))
INSERT INTO #Test(ID, Name) VALUES(1,'Test'),(2,'&Test'), (3,'<test>')
SELECT ID, Name FROM #Test
'Test,&Test,<test>'
SELECT STUFF((SELECT ','+Name AS [text()] FROM #Test FOR XML PATH('')),1,1,'')
'Test,&Test,<test>'
SELECT STUFF((SELECT ','+Name AS [text()] FROM #Test FOR XML PATH(''), TYPE).value('.', 'VARCHAR(MAX)'),1,1,'') AS 'NameList'
</test></test></test>
How to eliminate XML Escape Characters in "FOR XML PATH"?[
^]
Try this....
SELECT con.[Standard], STR(con.[Concentration(wt%)], 7, 4) AS 'Concentration(wt%)',
STR(con.[Sulfur(wt%)], 7, 4) AS 'Sulfur(wt%)', con.[g Bi/L], con.[Lead g/Gal], con.[ug/cm2],
con.[Ba(wt%)], con.[Ca(wt%)], con.[Cl(wt%)], con.[Cu(wt%)], con.[Mg(wt%)], con.[P(wt%)], con.[S(wt%)], con.[Zn(wt%)], con.[Br(wt%)], con.[Cd(wt%)],
con.[Cr(wt%)], con.[Hg(wt%)], con.[Pb(wt%)], con.[Al(wt%)], con.[F(wt%)], con.[Na(wt%)], con.[Si(wt%)], con.[Ti(wt%)], con.[Bromine Index], con.[Bromine Number],
con.[Acid Number], con.[Base Number], con.[ng/uL], con.[mg/kg],
con.PPM, con.[Iron (PPM)], con.[Nickel (PPM)], con.[Vanadium (PPM)],
STUFF((
SELECT ', ' + m.Method AS [text()]
FROM Method m, ProductMethod pm
WHERE m.MethodId=pm.MethodId AND con.ProductCode=pm.ProductCode
FOR XML PATH(''),TYPE).VALUE('.','VARCHAR(MAX)')
,1, 2, '') as Methods
FROM ProductConcenPPM con
WHERE con.ProductCode = @productCode
Regards,
GVPrabu