"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Saturday, May 8, 2010

Generate XML document using Store Procedure in SQL Server

hi everybody,
here a small piece of code to create a sp result to xml
Boost up your page performance by using this way if ur using some widget

CREATE PROCEDURE sp_getXML
AS
BEGIN
SELECT C.CategoryID,
C.CategoryName,
F.FurnitureID,F.FurnitureName,
SUM(F.FurniturePrice) FurniturePrice
FROM tbl_Furniture F
INNER JOIN tbl_Category C ON F.CategoryID = C.CategoryID
GROUP BY C.CategoryID,C.CategoryName,F.FurnitureID,F.FurnitureName
ORDER BY C.CategoryID
FOR XML AUTO, ROOT('Furnitures')
END


Have a nice day... 'N happy Coding :)

Need for Speed: ShiftNeed for Speed: ShiftGran Turismo 5

No comments: