Tuesday, January 31, 2012

Wam task notes

The note_desc in sa_work_order_task_notes is a long. To convert this to a varchar2 in a view, you need to create a function and pass the work order number, task and note type. then select the note desc into as long. You then need to convert it to a long raw and then a varchar2 with a statement like:


sys.utl_raw.CAST_TO_VARCHAR2(utl_raw.cast_to_raw(k));

This will bomb if the long is over 4K long, however, in this table that is not likely to be an issue.

MTW

No comments:

Post a Comment