Hi, all,

I just learned the support of TO_DATE will be avialbe in Trafodion in R2.0 from 
Anoop, that is great! At present, due to the urgent requirement of current 
migration project, we cannot wait, so I want to write a UDF to do the TO_DATE.
When I try to write it, I found it seems the UDF can only return simple data 
type like INT, VARCHAR, I cannot find the definition of returning a 
TIMESTAMP/DATE, could anyone help here?

In sqludr.h , I cannot find corresponding data type for DATE/TIMESTAM.
So I don't know how to define the UDF's entry function, example as below:

SQLUDR_LIBFUNC SQLUDR_INT32 to_date(SQLUDR_VC_STRUCT *srcStr,    //input string
                                SQLUDR_CHAR *pattern,     //date format
                                ??? *out1,     //the output
                                SQLUDR_INT16 *inInd1,
                                SQLUDR_INT16 *inInd2,
                                SQLUDR_INT16 *outInd1,
                                SQLUDR_TRAIL_ARGS)

How can I specify the out1 type to be a DATE or TIMESTAMP? I marked with '???' .

Thanks in advance,
Ming

Reply via email to