PARSENAME_UDF

Definition

This user-defined function (UDF) gets the PART_NUMBER index of a string separated by '.'.

PARSENAME_UDF(STR VARCHAR, PART_NUMBER INT)

Parameters

STR VARCHAR

The object name as a string.

PART_NUMBER INT

The part of the object name to be checked.

Returns

Returns the specified part of an object name.

Usage example

Input:

SELECT PARSENAME_UDF('Test_A.Test_B.Test_C]', 2);

Output:

Test_B

Last updated