This project is read-only.

 

 


 

fn_min_val (Transact_SQL)

See also: fn_max_val, fn_avg_val

 


This scalar UDF returns the minimum value from a comma delimited list of values.
 

Syntax

 fn_min_val(@list,@compare_as)

 

Arguments

@list = NVARCHAR(MAX) , string containing the list of values comma sepparated;

@compare_as = NVARCHAR(50), indicates if the values will be compared as string or numbers; values NUMBER or TEXT.

 

 

Return type

 

NVARCHAR(MAX)

Remarks

none

 

Permissions

Public

Dependencies

none

 

Examples

SELECT [Lib].[tsql].[fn_min_val] ('John,Chris,Franck','TEXT')

Result

 Chris

 

Other

none

 

 

Last edited Aug 28, 2012 at 6:19 PM by adudau, version 4

Comments

No comments yet.