fn_first_val (Transact_SQL)

See also: fn_min_val, fn_max_val, fn_avg_val, fn_last_val


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

Syntax

fn_first_val(@list)

Arguments

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

Return type

NVARCHAR(MAX)

Remarks

none

Permissions

Public

Dependencies

none

Examples

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

Result

John

Other

none


Last edited Sep 11, 2012 at 6:17 PM by adudau, version 1

Comments

No comments yet.