TypeNameOf
The TypeNameOf function returns the xSQL data type for the given input parameter.
Syntax
TypeNameOf(<value or expression>) |
Return Type
String
Details
TypeNameOf is a helper function that returns the data type of an expression or column value in a result set. It is often useful to verify the data type of a value is what you expect, particularly when having to cast from one type to another. Use the SHOW TYPES command to see the list of available data types within Connect.
Examples
eval TypeNameOf('Woolly mammoth');
select TypeNameOf(employee_id), TypeNameOf(participant_id), TypeNameOf(first_name), TypeNameOf(salary), TypeNameOf(effective_start_date) from xactly.xc_participant limit 1;
select TypeNameOf('1977-04-01'), TypeNameOf(ToDate('1977-04-01')) from Empty();
Related Functions