/***** C source file name: to_inches.c *****/ #define SQL_TEXT Latin_Text #include <sqltypes_td.h> #include <string.h> void meter_toInches( UDT_HANDLE *meterUdt, FLOAT *result, char sqlstate[6]) { FLOAT value; int length; /* Get meter's value. */ FNC_GetDistinctValue(*meterUdt, &value, SIZEOF_FLOAT, &length); /* Convert meters to inches and set the result value. */ *result = value * 3.28 * 12; }