Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> ConText and master-detail storage: contains clause
Garrett, I've got the same setup as in your posting:
......
Let's say that the master is MASTER, with primary key PK.
let's say that the detail is DETAIL, with fk FK, and a sequence
number LNO, to order the detail records, and a text column, TEXT,
which contains a line of text.
Here is how to do it in 1.1/2.0:
ctx_ddl.create_policy('MYPOL','DETAIL.TEXT',
textkey=>'FK', lineno=>'LNO', dstore_pref=>'CTXSYS.MD_TEXT');
......
But my CONTAINS clause brings back all of the records from DETAIL for the documents that match. Is there a way to only retrieve the records from MASTER that match? Or is "SELECT DISTINCT FK" my only recourse?
I have tried a textkey of 'FK, LNO', which comes back with an error of "DRG-10564: textkey column FK is not part of a composite key," although I beg to differ. But it makes me think that there is indeed a way of telling ConText that this is a composite key, and it only needs to return the particular line that matches. This could also be more useful in that the results would tell me which specific line contains the match.
Thanks for your time.
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Sun Apr 26 1998 - 23:29:50 CDT
![]() |
![]() |