You need to de-reference the LONG fieldand extract the string from the referenced storage location. This can be done bywriting a function to translate the LONG to VARCHAR – see attached.
Once you have created the function, youcan execute a query similar to the following:
SELECT
CASE
WHEN ATTRTYPE = -18 THEN VALSTR
WHEN ATTRTYPE = -7 THEN TO_CHAR(VALDATE)
WHEN ATTRTYPE = -1 THEN VALSTR
WHEN ATTRTYPE = 2 THEN TO_CHAR(VALINT)
WHEN ATTRTYPE = 5 THEN TO_CHAR(VALINT)
WHEN ATTRTYPE = 10 THEN VALSTR
WHEN ATTRTYPE = 11 THEN GETLONG('LLATTRDATA','VALLONG', ROWID)
WHEN ATTRTYPE = 12 THEN TO_CHAR(VALINT)
WHEN ATTRTYPE = 13 THEN TO_CHAR(VALDATE)
WHEN ATTRTYPE = 14 THEN TO_CHAR(VALINT)
ELSE NULL
END ATTRVAL
FROM LLATTRDATA
Hope this helps. Regards,
Eric
From: eLinkDiscussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: Friday, June 09, 2006 1:40PMTo: eLink RecipientSubject: Well, I did a search anddidn't see this covered in any other coversations so...
Well, I did a search and didn't see this covered in any other coversations so...
Posted by kevinto (To, Kevin) on 06/09/2006 04:37 PM
Well, I did a search and didn't see this covered in any other coversations so here we go. I need to build a live report that returns a list of workflow IDs and titles searching by keywords in the comments of the workflow. For example, if in some workflow, someone had left a comment that included the word "mexico", I need to find all workflows where the comments contain the word "mexico". The trouble I'm having is that the comments are stored in a "Long" datatype column in our Oracle 9i database, and I can't get any string comparisons to work...any thoughts?