UFN_PDCOMPOSITESEGMENTTABLELIST_TOITEMLISTXML
Returns an xml string representation of tables for a composite segment.
Return
Return Type |
---|
xml |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_PDCOMPOSITESEGMENTTABLELIST_TOITEMLISTXML(@ID uniqueidentifier)
returns xml
as
begin
return(
select t2.ID as TABLENAMEID
from dbo.PDCOMPOSITESEGMENTTABLELIST t1 inner join dbo.PDACCOUNTTABLESAVAILABLEFORSEGMENT t2 on t1.PDACCOUNTTABLESAVAILABLEFORSEGMENTID = t2.ID
where t1.PDCOMPOSITESEGMENTID = @ID
for xml raw('ITEM'),type,elements,root('TABLENAME'),BINARY BASE64 )
end