Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Make a SQL statement to retrieve a value within ExtendedData
Marsh_USA
Hi,For examplet, lets say that I have a custom node, and it has a field named "Office" which is stored in the extendedData column. How can I retrieve a list of all items that have Office = "Toronto" within the ExtendedData Column.Thanks.
Find more posts tagged with
Comments
Cynthia_Philpott
Hello Marsh,Given the fact that the extendedData column is declared as a long it makes it extremely difficult to search for values. Here is how we kinda got around it. Created a pl/sql function that when given the following (dataid, string to search) it will search through the extended data column.Basically we use a livereport which calls this function and gives it a (data id and string).The sql looks as followsLive Report codeselect d.* from dtree d where subtype = '' and '1' = (select findvaluefromextend(d.dataid,) from dual;The function codeCREATE OR REPLACE FUNCTION findvaluefromextend( recdataid IN VARCHAR2, STRING IN VARCHAR2)RETURN VARCHAR2IS vextended VARCHAR2 (10000); vstring VARCHAR2 (500);BEGIN SELECT extendeddata INTO vextended FROM dtree WHERE dataid = recdataid; IF INSTR (UPPER (vextended), UPPER (vstring)) > 1 THEN RETURN 1; ELSE RETURN 0; END IF;END findvaluefromextend;/
Guy_Pomerleau
How exactly does one go about creating the function findvaluefromextend ?
Bhupinder_Singh
Message from Bhupinder Singh <
bsingh@opentext.com
> via eLink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">eLink
Let me know if this helps:
SQL Server:
http://msdn2.microsoft.com/en-us/library/aa258261(SQL.80).aspx
Oracle:
http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_5009.htm
- Bhupinder
------------------------------------------------------
Bhupinder Singh, B.Math., B.Ed.
Senior Product Specialist, Customer Support
Open Text Corporation, Waterloo, Ontario, Canada
Customer support e-mail: support@opentext.com
Customer Support Telephone: 800-540-7292
------------------------------------------------------
From:
eLink Discussion: Livelink LiveReports Discussion [mailto:livereportsdiscussion@elinkkc.opentext.com]
Sent:
Tuesday, October 23, 2007 3:11 PM
To:
eLink Recipient
Subject:
accessing extendeddata
accessing extendeddata
Posted by
cansa01user2
(Pomerleau, Guy) on 10/23/2007 03:09 PM
In reply to:
Hello Marsh,
Posted by
uclluser1
(Walkush, Melissa) on 04/06/2006 04:12 PM
How exactly does one go about creating the function findvaluefromextend ?