user-func and char datatype
Posted in 1998
Philipp Gruenig — — source: Informix-list mailing list archive (1991-1998)
Hi How must I program a user-function in IUS9.13 for doing some string functions! There is a table in our db with a field 'NAME' field name = char(31) in it is the name saved seperated by a komma. "FIRST,LAST" Now I must have a function for extracting the firstname. function input = (field) name "FIRST,LAST" function output = "FIRST" the following select must be possible: SELECT getFirstName(NAME) from customers WHERE ID = 10; Is there a easy way for doing this with an external c function? When yes, how must I declare the c-function and how do i pass the chars from and to the function? I use already some c-user-functions, but none with char manipulations. Only long,Integer manipulation. regards Philipp Gruenig