[dbo].[ExistCollection]
(local)
>
mdb
>
Scalar-valued Functions
> dbo.ExistCollection
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]
.
[ExistCollection]
(
@x
XML
,
@i
int
)
returns
bit
BEGIN
declare
@idx
varchar
(
10
)
set
@idx
=
cast
(
@i
as
varchar
(
10
))
return
isnull
(
@x.exist
(
'collection/item/@key[.=sql:variable("@i")]'
),
0
)
END
GO
Uses
dbo