UFN_DISCOUNT_GETPROMOTIONALCODES_TOITEMLISTXML

Used to convert the results of UFN_DISCOUNT_GETPROMOTIONALCODES to xml.

Return

Return Type
xml

Parameters

Parameter Parameter Type Mode Description
@DISCOUNTID uniqueidentifier IN

Definition

Copy
/*
Generated by Blackbaud AppFx Platform
Date:  1/27/2010 6:50:34 PM
Assembly Version:  Blackbaud.AppFx.Platform.SqlClr, Version=2.5.465.0, Culture=neutral, PublicKeyToken=null
Based on:  UFN_DISCOUNT_GETPROMOTIONALCODES
Copyright Blackbaud
*/
CREATE FUNCTION dbo.[UFN_DISCOUNT_GETPROMOTIONALCODES_TOITEMLISTXML](
@DISCOUNTID uniqueidentifier
    )
returns xml
as
BEGIN

RETURN (
SELECT [ID], [PROMOTIONALCODE], [SEQUENCE], [VALIDFROM], [VALIDTO]
 FROM dbo.[UFN_DISCOUNT_GETPROMOTIONALCODES](@DISCOUNTID)
 order by SEQUENCE,ID
 for xml raw('ITEM'),type,elements,root('PROMOTIONALCODES'),BINARY BASE64

)

END