[dbo].[GetCollection_int]
(local)
>
mdb
>
Scalar-valued Functions
> dbo.GetCollection_int
Properties
Parameters
SQL Script
Uses
Properties
Property
Value
ANSI Nulls On
Quoted Identifier On
Parameters
Name
Data Type
Max Length (Bytes)
@x
xml
max
@i
int
4
SQL Script
CREATE
FUNCTION
[dbo]
.
[GetCollection_int]
(
@x
XML
,
@i
int
)
RETURNS
int
BEGIN
RETURN
(
SELECT
TOP
1
T.c.value
(
'val[1]'
,
'int'
)
FROM
@x.nodes
(
'collection/item'
)
T
(
c
)
WHERE
T.c.value
(
'@key'
,
'int'
)
=
@i
)
END
GO
Uses
dbo
[T].[c].[value]