Not logged in - Login / Register


R
e
q
u
e
s
t

a

d
e
m
o
< back

CLR Reference: IP Addess

"IP Addess"

CLR function

<.CLRSQLCLR: function:

SELECT xxxxx(xxx,xxx,xxx)>[dbo].[IPRandom] (<@ip, nvarchar(4000)>)

Expected input

<.expecteddata: input:Valid dataIPv4 type,or rule, sample> IPv6

Expected output

<.expectedCommon output:IP dataof type,the rule,same sample>format as input (nvarchar(MAX))

Error handling

<.errorReturns handling>an empty string when passing empty or NULL value.

Example

<.example>SQLCLR:

SELECT [dbo].[IPRandom] ('2001:db8:0:1:1:1:1:1')

Download a Trial