fn_mode_val (Transact_SQL)

See also:


This scalar UDF returns the most common value in a list. If no value is the most common NULL is returned.

 Syntax

fn_mode_val(@list)

Arguments

@list = NVARCHAR(MAX), list of numeric values to calculate the median for.

 

Return type

BIGINT

Remarks

none

Permissions

Public

Dependencies

none

Examples

SELECT [tsql].[fn_mode_val] ('1,2,2,3,4,5')

Result: 2

 

Other

none


Last edited Sep 14, 2012 at 7:59 PM by adudau, version 1

Comments

No comments yet.