USP_DATALIST_QUERYVIEWOUTPUT
Displays the output columns for the query view list.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@QUERYVIEWID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
Definition
Copy
create procedure dbo.USP_DATALIST_QUERYVIEWOUTPUT
(
@QUERYVIEWID uniqueidentifier
)
as
set nocount on;
with xmlnamespaces ('bb_appfx_queryview' as tns, 'bb_appfx_commontypes' as common)
select
queryviewoutput.fields.value('@Name', 'nvarchar(max)') as NAME,
queryviewoutput.fields.value('@Caption', 'nvarchar(max)') as CAPTION,
coalesce(queryviewoutput.fields.value('@DataType', 'nvarchar(18)'), 'String') as DATATYPE,
coalesce(queryviewoutput.fields.value('@IsDefaultOutput', 'bit'), 0) as ISDEFAULTOUTPUT,
coalesce(queryviewoutput.fields.value('@IsHidden', 'bit'), 0) as HIDDEN
from dbo.QUERYVIEWCATALOG as Q
cross apply Q.QUERYVIEWSPEC.nodes('tns:QueryViewSpec/tns:Output/tns:OutputFields/tns:OutputField') as queryviewoutput(fields)
where Q.ID = @QUERYVIEWID