Fetch Spent time on task

How to get udfval_str value from this table "gr_udfval" ?
http://www.trackstudio.ru/forum/
http://www.trackstudio.ru/forum/fetch-spent-time-on-task-issue-6366.html
skd wrote:How to get udfval_str value from this table "gr_udfval" ?