Search Syntax Needed

If this is answered somewhere in here I apologise but I haven't been able to find it. I am trying to set up a QueryText value for use in a search in Site Studio to return all native documents that have a value in a specific field. Not a specific value, just a value (i.e. not null and not spaces). I am using OracleText Search but I am not sure if that makes a difference.
I tried to use the Query Builder in UCM to form my query but I cannot get anything that returns the correct results. My only query options are <contains>, <matches>, <has prefix>, and <not contains>. and none of those does the trick.
Help would be greatly appreciated.
Bill
Edited by: 814215 on Jan 11, 2011 2:29 PM

Thanks, yours was the perfect answer. I just figured this out myself about an hour ago and was about to post the answer but I gave you the credit anyway :-)
I was confused by the query builder which, when using Oracle Text Search doesn't allow the search string to be spaces. What you have to do is put something in the string then manually edit it down so it just leaves the two backward quotes (``) as the criteria. I'd tried many which ways but eventually came across it by accident.
Thanks again,
Bill

Similar Messages

  • Search syntax for Safari history? how to remove items from specific pages?

    I'm using Safari 5.0.3 and I prefer keeping the browsing history quite long for accessing contents I had been searching in the net some weeks ago.
    However, that way I'm collecting lots of clutter and therefore I'd like to remove selected entries from the history, e. g. from the page where I'm reading daily news etc.
    I tried to use the search field (accessible with Cmd-F in the history view) to search for parts of the corresponding web address, e. g. "http://www.heute.de", but I do not only get the history items from that site but many others from google and other pages.
    So I'd like to know: is there a search syntax to use the search field, like address=www.heute.de* which enables wild cards, operators like OR/AND etc.?
    If not, is there a 3rd party tool which can help or can I use spotlight/the finder to find and remove the unwanted items from the browser history?

    Hi beckmart
    there might be ready-made apps or add-ons to do that - but this may help...
    quit safari, open Home/Library/Safari/History.plist using PrefSetter
    enter the url you want removed in the search box, no need for quotes - say www.google.com
    expand the 'web history dates' section at left to see individual results, then select the first one & shift-click the last (don't use select all) to highlight/select all the results - then press the delete key to remove them. Then save the file.
    Naturally, a backup copy of history.plist would be wise - but the above seems to work very well.

  • Help required to customize Simple/Advanced Search. Need to add new fields

    Hello,
    Module: Oracle Sales Online
    EBS version: 12.1.3
    Jdev version: 10.1.3.3
    Scenario:
    - We are dealing with standard oracle pages.
    - We have TWO "SIMPLE/ADVANCED SEARCH"s available. Each "Simple/Advanced Search" can be found by navigating through paths "A --> B" and "A --> B --> C --> D" . Here it means one "SIMPLE/ADVANCED SEARCH" page is available at page "B" and another "SIMPLE/ADVANCED SEARCH" is available at page "D".
    - In the first search page which is at page "B", both Simple as well as Advanced search has a filter field "Win Probability %", of type VARCHAR2/DROPDOWN with values (10, >=10, <=30, 30, >=30, <=50, 50, >=50, <=70, 70, >=70, <=90, 90, 100)
    - In second search page, referring to page "D", the Simple search DOESN'T have the "Win Probability %". And the Advanced Search page has the "Win Probability %" but it is of type - NUMBER/MessageTextInput type.
    Issue/Requirement:
    - The 2nd Simple/Advanced search pages need to have "WIN PROBABILITY %" field and it should be of VARCHAR2/DROPDOWN with values (10, >=10, <=30, 30, >=30, <=50, 50, >=50, <=70, 70, >=70, <=90, 90, 100) just like the way we had in 1st Simple/Advanced search.
    Note:
    - Again speaking we are dealing with standard oracle pages
    - If you go to the "About this Page", interestingly I found:
    i. The "message component layout" for both of them is from the same region , i.e., ASNOpptympSrchRN
    ii. Rest of the search filters for both the searchs are from common View Object , i.e., OpptySearchVO1 (for Simple search), OpportunityDetailsVO1 (for advanced search)
    iii. The "Stack layout" for both the search pages are same, i.e. XXMASOpptyQryCO
    iv. None of the fields are rendered to false (everything is set to be rendered TRUE)
    Any response is highly appreciated.
    Thanks,
    Anand
    Edited by: 933590 on Jul 19, 2012 8:18 AM

    "XXMASOpptyQryCO is the name of stacklayout or CO?
    What is the CO?
    Does both pages share same CO?
    have you already extended the CO "XXMASOpptyQryCO"?
    what is the original CO then? I think in that CO it must be written somewhere, simple search "search allowed = false""
    -Here CO what you are referring is a controller.
    -FYI pages share same controller.
    -And the original controller for both the pages are OpptyUwqCO. Right now its extended controller is XXMASOpptyQryCO
    Fact is I didn't create this search page. It was built by some third party members. Also that I do not have the original source nor the documentation pertaining to it. So could you inform as in how should I navigate to the point "Search Allowed = True"
    I should have informed that at "B" page, it has a region      /oracle/apps/asn/opportunity/webui/ASNMgrOpptyQryRN and at page "D", the region is      /oracle/apps/asn/opportunity/webui/ASNOpptyQryRN
    Edited by: 933590 on Jul 19, 2012 1:37 PM

  • Meta tags for search engines needed only to homepage mainly ?

    meta tags for search engines needed only to homepage mainly
    ?

    .oO(123polis123)
    >meta tags for search engines needed only to homepage
    mainly ?
    A title and maybe a meta description belong to every single
    page. But
    much more important is usable and properly structured
    content.
    Micha

  • Low level Hex disk edit & search util needed- suggestions please?

    low level Hex disk edit & search util needed- suggestions please?
    Maybe It's just late & I've had a bad day.... but I haven't needed a low level Hex disk edit & search utility suitable for an Intel 10.4.x Mac until now and can't seem to locate one.
    There should be plenty of free/shareware options (because they're handy and not particularly hard to write ... and every tech head needs one some time)...
    Any suggestions please?
    [I haven't bothered with the commercial stuff - like tech tool/Norton/*insert name here* Recover/repair, Something Genius etc. etc. because they are all without exception either unnecessary (just pretty shells for the underlying UNIX/X utils) useless AND greedy $-gougers, just useless, or just money gougers so I couldn't even say whether any still have a 'feature' like the old Norton Disk editor app had - but a quick look about suggest not...]
    grumble
    Any specific suggestions/links, please?
    TIA

    they are all without exception either unnecessary (just pretty shells for the underlying UNIX/X utils) useless AND greedy $-gougers, just
    useless, or just money gougers
    Such a high-esteem for fellow human beings - and
    programmers...
    You know, there are some good decent nice people
    behind those names?
    You'd be amazed at how much testing goes into a product.
    [SNIP]
    g'day Hatter...
    Yes, I know there are some good decent nice people behind those names..fellow human beings - and fellow programmers (so yes, I do know...) In previous incarnations I have 'thunk up' and developed, Marketed & supported considerably more complex Apps & systems myself - I even know some of the people you mention personally - and they are usually decent Blokes/women but normally, it isn't the programmers who make the decisions on pricing/features/support/performance/upgrade costs & cycles etc...
    My only error was, I agree, the phrase 'without exception' - but (mainly) only because I haven't bought/tested & used all of them very very recently. So I offer my apologies to those to whom my remarks should not apply (long, late night/early morning frustration...)
    However, I also offer a few simple pertinent examples:
    One 'top name' Utility company had a 'save your Mac HD' product on the market for some time that was almost guaranteed to TRASH it irretrievably but did NOT say so - nor did they help or compensate those they harmed.
    Several are selling what amount to simple, pretty, GUI shells for 'free' or OS-included command line tools - no more, no less but do NOT say so and are asking good money for the 'software'.
    Many are asking ridiculous prices for "regular upgrades" so you can keep their tool current with your Mac OS - one wants US$100/year for it, another, $15 per u/g, others, US$25 or $40 per u/g; one asks 'only' $10 - and these 'upgrades' are happening 3,4,5,6 times per year and are necessary for the Marketing company to keep their product Saleable to new purchasers and new Macs (as well as for important Bug Fixes - and only co-incidentally to keep it performing with your current Mac and OS - which is what you paid them for in the first place).
    I won't pay for a product 3, 6 or 9 times and I won't advise my clients to: It's not unreasonable for a person to expect a 'sensible lifetime/currency' of Product X for Computer Y - say 3 years (e.g. AppleCare). I wouldn't object to paying for an "upgrade" at that point - IF it's worth the money.
    Software is Waaay too expensive in many cases and is simply inviting 'piracy' - from people who have already PAID for the product: sadly, they are killing their own Gooses.
    Seriously, one product costs ca. US$100 to Buy in the first place
    To keep it actually working for you costs about the same again Per Year - a 3 year 'sensible lifetime' or 'currency' cost of US$300 or $400! [That'll buy a lot of 'bare drives' to put in a handy Firewire case for automatic backups in Background, differential backups etc. and other simple practices which render this product type largely unnecessary ].
    For what? A relatively simple set of utilities which would actually cost the company involved less than $5 total each - over 3 years - to make available to existing ( or 'current') owners. [Applecare 'complete' Hardware and Software warranty & support on a US$2000 iMac - which includes Tech Tools Pro Deluxe or somesuch costs about US$165 for 3 years. Total.]
    Having designed, developed, Marketed, supported & maintained more complex Applications to/for a sizeable user-base (in US terms) over multiple complete Series of Product 'life-cycles' - regular Updates and all, I think I know where the pirates are.
    These practices have been rampant in the MSWindows™ market for a longtime. It's a real shame to see it in the Mac world.
    I have all the esteem in the world for those fellow human beings who deserve such - and programmers who are 'good decent nice people'.
    I have none to spare for monopolists, 'exploitationists' or any of those who take unfair/unreasonable advantage of their fellow human beings - AND of programmers who are 'good decent nice people' (like, say, ME... .
    In any event, as I said: they are "killing their Gooses": I know of at least 6 software companies which went this route a while back. All are dead or dying.
    Thank you for your help - and the opportunity to apologise for 'mis-speaking'.
    all the best,
    orig g4 733, many others thru (the luvly) Macintels     New & old Macs, Wintels, MacIntels, other systems...

  • Bing Search syntax - specify a single site in Default text?

    I know that when doing a search using the web browser that I can use
    site:wherever.com as part of the search string.
    Is it possible to do this using Bing Search inside Project Siena ? If yes, some sample syntax for text, image, composite search would be much appreciated.

    Thanks.
    What I'm trying to do is set a default String in the input box and at the very
    end change the visibility.
    So, I'm not allowing user input.
    So hypothetically I want to search (I wouldn't do this for real, this is just an
    example) for images of Barack Obama at whitehouse.gov
    So my input text1 field would have Barack O'Bama and I would change the default
    from "Input" to "Barack O'Bama" and make it invisible.
    without limiting the site scope I'd have
    BingSearch!Image(InputText1Text)!results
    For my use case I just would add
    BingSearch!Image(InputText1Text& " site:whitehouse.gov")!results
    with a space between & and "site....              Correct?
    (I'll go play around...)
    On Thu, 27 Mar 2014 16:33:53 +0000, Robin Abraham [MSFT] wrote:
    >Image search: BingSearch!Image(InputText1!Text & " site:youtube.com")!results  -- in this case MediaUrl column of the results is what you need to bind to your image controls.
    -- Barb Bowman

  • Formatted Search Syntax

    Hi all,
    Can anyone explain the syntax of a formatted search to me?  For example, sometimes I need to use the syntax $[$Item.0.0], other times I need to use the syntax $[$table.attribute]
    TIA

    The reference to the current data is through these type of syntax.
    $[Tablename.Fieldname]
         Tablename – indicates the table, which the active window relates to.
         Fieldname  – the field from the active window.
    $[$Field Index. Field Column. Number/Currency/Date.0]
         This syntax uses the field’s index instead of the specific document table.
         This query syntax includes 3 elements:
    1.Field index - each field in the active window can be related by a unique index.
    2.Field column - In case the required field is a Table field (item code, item name,
       price, quantity in marketing documents etc.), it has to be related by index and column
       numbers. In case the required field is a Title field, this element should be set to 0.
    3.Number / Currency / Date / 0   -                                    
         In case the required field includes a number + a currency symbol (item price,
       document total), type Number to retrieve the number (without the currency symbol or
       the measurement unit). This separation is essential in case the user wish to use the
       price for arithmetic expressions.  
       Type Currency to retrieve the currency symbol or the weight unit.
       In case the required field is a Date field, and it has to be used for computation,
       type Date.

  • Search help - Need to read dynpro of the calling program

    Hello all,
    We have a requirement where we need to read the dynpro of the calling program of a search help.
    Say I have a screen (selection screen, module pool or ALV grid etc) where I have a field PARTNER with whom a custom search help is attached. But on this same screen there is another field RLTYP. What we want is that when an F4 is taken on PARTNER, the value of RLTYP should also be passed as value to the Search help exit.
    In short, we need to read the screen fields of the calling screen of a search help.
    Any ideas are appreciated.
    Regards
    Priyanka

    Check the sample code:
    FUNCTION F4IF_SHLP_EXIT_OFFRCONT.
    ""Local interface:
    *"  TABLES
    *"      SHLP_TAB TYPE  SHLP_DESCT
    *"      RECORD_TAB STRUCTURE  SEAHLPRES
    *"  CHANGING
    *"     VALUE(SHLP) TYPE  SHLP_DESCR
    *"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
      DATA : ws_flag(1) TYPE c,
             ws_rec(1)  TYPE c.
      DATA : i_dynpfields TYPE dynpread OCCURS 0 WITH HEADER LINE.
      DATA : ws_data TYPE ddshiface,
             i_data TYPE ddshifaces.
      ws_flag = 'X'.
      ws_rec = 'X'.
      IF ws_flag = 'X'.
        i_dynpfields-fieldname = 'P_CUST'.
        APPEND i_dynpfields.
        CALL FUNCTION 'DYNP_VALUES_READ'
          EXPORTING
            dyname               = sy-cprog
            dynumb               = '1000'
          TABLES
            dynpfields           = i_dynpfields
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            invalid_parameter    = 7
            undefind_error       = 8
            double_conversion    = 9
            stepl_not_found      = 10
            OTHERS               = 11.
        READ TABLE i_dynpfields WITH KEY fieldname = 'P_CUST'.
        ws_data-shlpfield = 'ZCUSTOMER'.
        ws_data-valfield = 'G_SIMFIELDS-FIELDNAME'.
        ws_data-value = i_dynpfields-fieldvalue.
        APPEND ws_data TO i_data.
        ws_data-shlpfield = 'ZOFFRCONT'.
        ws_data-valfield = 'P_CONT'.
        ws_data-f4field =     'X'.
        APPEND ws_data TO i_data.
        LOOP AT shlp_tab.
          IF ws_rec = 'X'.
            shlp_tab-interface[] = i_data[].
            APPEND shlp_tab.
            ws_rec = ' '.
          ENDIF.
        ENDLOOP.
        DELETE shlp_tab INDEX 1.
        ws_flag = ' '.
      ENDIF.
    ENDFUNCTION.
    Regards,
    Prakash.

  • What is the search syntax when trying to filter recipients in Exchange Admin Center?

    I'm hoping it's just an oversight on my part but, for the life of me, I can't figure out how to perform an advanced search. Interesting enough, when you start typing it provides tokens but there doesn't appear to be any wildcard options. As an
    example we have a multi-tenant environment, and I want to search for all those whose email address contains "contoso" -- Zero results.
    I think okay, perhaps I should use the ellipsis to jump into the Advanced search dialog. Same results -- zero. Oh wow, there's that handy Help link in the top-right corner. That will set me on the correct path. *Click* oh wow, it takes me to a TechNet Library
    page titled "Recipients > Advanced Filter" but alas it is still waiting to be populated with content.
    I've been hunting around but to no avail. It seems there clearly a push to use PS for any administrative tasks. As much as I'm on board with this, there is definitely
    beauty is having a web-based console at my fingertips.
    Perhaps we are expected to the same recipient filter syntax? -eq -ne -like

    Hi,
    EAC in Exchange 2013 is different from EMC in exchange 2010.The filter has changed and wildcards are not supported.
    Sorry that the feature is unavailable at this time,for this feature you are concerning, we welcome you submit feedback
    here for the further improvement of our product. If the service is requested frequently, the product team may include it in future product releases.
    Thanks.
    Niko Cheng
    TechNet Community Support

  • Search help needs more records than 500 or 5000

    I have a requirement to create search help on a non primary key field . So I need to work on search help exit to remove all the repeating and blank values . The problem I am facing rite now is that search help gets only 500 records by default and 5000 if we leave the restriction field blank . I need to get all the records which is approx more than 100000 and get only the unique values .
    Please let me know how I can increase the number of record more than 5000
    Regards,
    Tashi

    Hi Tashi,
    The following approach might work out in y our case by overwriting the data fetch functionality of the standard Search help
    1. Define internal table of desired structure, in the way you get the data from DB table
    2. use your custom function module / class method or select statement to get the desired data into the newly
        defined   internal table
    3. apply required sorting / filtering / formatting as per the requirements
    3. loop through the resultant data in the internal table and append the records to standard internal
        table / parameter  RECORD_TAB of the Search help exit. Please make a note that RECORD_TAB has the
        structure field STRING which needs to be populated with the correct offsetting..for example, if the first field
         is of 10 characters and second field of 5 characters, it should be populated in the following way
    loop at itab into ls_itab.
    wa_record-string+0 = ls_itab-field1.
    wa_record-string+10 = ls_itab-field2.
    wa_record-string+15 = ls_itab-field3.
    append wa_record to record_tab.
    clear wa_record.
    endloop.
    EXIT.
    Please try this approach and let us know.
    hope this helps.
    -Sajan Joseph.

  • Text index search issue -- need help

    Hi,
    We have created a text index using the below script. This is working fine and we are able to retrieve data when we do a search on this with 'contains' clause.
    CREATE INDEX ITEM_TXT_IDX ON ITEM
    (ITEM_NAME)
    INDEXTYPE IS CTXSYS.CONTEXT;However now the problem is we are not able to search with special characters.
    when we perform search with below query it doesnt retrieve any record. i guess when we search with special character using text index, it ignores the special characters and performs search
    SELECT * FROM item
    WHERE contains(item_name, 'AGREE NATURE BALANCED NRML LIQ 300 ML (#', 1) > 0 the below query retrieves record fine as it doesnt have any special character search.
    SELECT * FROM item
    WHERE contains(item_name, 'AGREE NATURE BALANCED NRML LIQ 300 ML', 1) > 0can anyone pls help?

    You need to escape the special characters by either putting \ in front of each special character or putting {} around each token containing special characters. That will cause the contains query to view them as ordinary characters instead of attributing special meaning to them. However, since, by default, they are not tokenized and indexed, they will be ignored and your search will find a string with those characters and a string without those characters. If you want to be able to search for the actual characters, then you need to set them as printjoins in a lexer and use that lexer as a parameter in your index creation. You can see what has been tokenized and indexed by selecting from the token_text column of the dr$your_index_name$i domain index table after index creation. Please see the demonstration below.
    SCOTT@orcl_11gR2> -- test environment:
    SCOTT@orcl_11gR2> CREATE TABLE item
      2    (item_name  VARCHAR2 (60))
      3  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO item (item_name) VALUES ('AGREE NATURE BALANCED NRML LIQ 300 ML (#')
      3  INTO item (item_name) VALUES ('AGREE NATURE BALANCED NRML LIQ 300 ML')
      4  INTO item (item_name) VALUES ('OTHER DATA')
      5  SELECT * FROM DUAL
      6  /
    3 rows created.
    SCOTT@orcl_11gR2> -- without printjoins:
    SCOTT@orcl_11gR2> CREATE INDEX ITEM_TXT_IDX
      2  ON ITEM (ITEM_NAME)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$item_txt_idx$i
      2  /
    TOKEN_TEXT
    300
    AGREE
    BALANCED
    DATA
    LIQ
    ML
    NATURE
    NRML
    OTHER
    9 rows selected.
    SCOTT@orcl_11gR2> SELECT * FROM item
      2  WHERE  contains
      3             (item_name,
      4              'AGREE NATURE BALANCED NRML LIQ 300 ML \(\#',
      5              1) > 0
      6  /
    ITEM_NAME
    AGREE NATURE BALANCED NRML LIQ 300 ML (#
    AGREE NATURE BALANCED NRML LIQ 300 ML
    2 rows selected.
    SCOTT@orcl_11gR2> SELECT * FROM item
      2  WHERE  contains
      3             (item_name,
      4              'AGREE NATURE BALANCED NRML LIQ 300 ML {(#}',
      5              1) > 0
      6  /
    ITEM_NAME
    AGREE NATURE BALANCED NRML LIQ 300 ML (#
    AGREE NATURE BALANCED NRML LIQ 300 ML
    2 rows selected.
    SCOTT@orcl_11gR2> -- with printjoins:
    SCOTT@orcl_11gR2> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('item_lexer', 'BASIC_LEXER');
      3    CTX_DDL.SET_ATTRIBUTE ('item_lexer', 'PRINTJOINS', '(#');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> DROP INDEX item_txt_idx
      2  /
    Index dropped.
    SCOTT@orcl_11gR2> CREATE INDEX ITEM_TXT_IDX
      2  ON ITEM (ITEM_NAME)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS ('LEXER  item_lexer')
      5  /
    Index created.
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$item_txt_idx$i
      2  /
    TOKEN_TEXT
    300
    AGREE
    BALANCED
    DATA
    LIQ
    ML
    NATURE
    NRML
    OTHER
    10 rows selected.
    SCOTT@orcl_11gR2> SELECT * FROM item
      2  WHERE  contains
      3             (item_name,
      4              'AGREE NATURE BALANCED NRML LIQ 300 ML \(\#',
      5              1) > 0
      6  /
    ITEM_NAME
    AGREE NATURE BALANCED NRML LIQ 300 ML (#
    1 row selected.
    SCOTT@orcl_11gR2> SELECT * FROM item
      2  WHERE  contains
      3             (item_name,
      4              'AGREE NATURE BALANCED NRML LIQ 300 ML {(#}',
      5              1) > 0
      6  /
    ITEM_NAME
    AGREE NATURE BALANCED NRML LIQ 300 ML (#
    1 row selected.
    SCOTT@orcl_11gR2>

  • Searching Problem, need help plz...

    Hi All,
    I have a problem. After created index my_doc_idx1, i’m searching a word on all document i stored but find nothing. Everytime i search there’s no rows selected.
    anybody help me please?
    I including my code.
    My documents are:
    1. doc1.html contain:
    “Oracle interMedia audio, document, image, and video is designed to manage Internet media content”
    2. doc2.html contain:
    “Oracle interMedia User’s Guide and Reference, Release 9.0.1”
    3. word1.doc contain:
    “Oracle application server.”
    4. oracletext.pdf contain:
    “Stages of Index Creation.”
    Oracle9i 9 realese 2, Windows XP
    Thanks,
    Robby
    set serveroutput on
    set echo on
    -- create table
    create table my_doc (
    id number,
    document ordsys.orddoc);
    INSERT INTO my_doc VALUES(1,ORDSYS.ORDDoc.init());
    INSERT INTO my_doc VALUES(2,ORDSYS.ORDDoc.init());
    INSERT INTO my_doc VALUES(3,ORDSYS.ORDDoc.init());
    INSERT INTO my_doc VALUES(4,ORDSYS.ORDDoc.init());
    COMMIT;
    -- create directory
    create or replace directory dir_doc as 'e:\projects'
    -- import data
    DECLARE
    obj ORDSYS.ORDDoc;
    ctx RAW(4000) := NULL;
    BEGIN
    SELECT document INTO obj FROM my_doc WHERE id = 1 FOR UPDATE;
    obj.setSource('file','DIR_DOC','doc1.html');
    obj.import(ctx,FALSE);
    UPDATE my_doc SET document = obj WHERE id = 1;
    COMMIT;
    SELECT document INTO obj FROM my_doc WHERE id = 2 FOR UPDATE;
    obj.setSource('file','DIR_DOC','doc2.html');
    obj.import(ctx,FALSE);
    UPDATE my_doc SET document = obj WHERE id = 2;
    COMMIT;
    SELECT document INTO obj FROM my_doc WHERE id = 3 FOR UPDATE;
    obj.setSource('file','DIR_DOC','word1.doc');
    obj.import(ctx,FALSE);
    UPDATE my_doc SET document = obj WHERE id = 3;
    COMMIT;
    SELECT document INTO obj FROM my_doc WHERE id = 4 FOR UPDATE;
    obj.setSource('file','DIR_DOC','oracletext.pdf');
    obj.import(ctx,FALSE);
    UPDATE my_doc SET document = obj WHERE id = 4;
    COMMIT;
    END;
    -- check properties
    DECLARE
    obj ORDSYS.ORDDoc;
    idnum INTEGER;
    ext VARCHAR2(5);
    dotpos INTEGER;
    mimetype VARCHAR2(50);
    fname VARCHAR2(50);
    ctx RAW(4000) := NULL;
    BEGIN
    fname:= '';
    DBMS_OUTPUT.PUT_LINE('----------------------------------------');
    FOR I IN 1..4 LOOP
    SELECT id, document INTO idnum, obj FROM my_doc
    WHERE id = I;
    fname := obj.getSourceName();
    dotpos := INSTR(fname, '.');
    IF dotpos != 0 THEN
    ext := LOWER(SUBSTR(fname, dotpos + 1));
    ext := LOWER(ext);
    mimetype := 'application/' || ext;
    IF ext = 'doc' THEN
    mimetype := 'application/msword';
    obj.setFormat('DOC');
    ELSIF ext = 'pdf' THEN
    mimetype := 'application/pdf';
    obj.setFormat('PDF');
    ELSIF ext = 'ppt' THEN
    mimetype := 'application/vnd.ms-powerpoint';
    obj.setFormat('PPT');
    ELSIF ext = 'txt' THEN
    obj.setFormat('TXT');
    END IF;
    obj.setMimetype(mimetype);
    END IF;
    DBMS_OUTPUT.PUT_LINE('Document ID: ' || idnum);
    IF TO_CHAR(DBMS_LOB.getLength (obj.getContent())) = 0 THEN
    DBMS_OUTPUT.PUT_LINE('Content is NULL.');
    DBMS_OUTPUT.PUT_LINE('No information available.');
    ELSIF TO_CHAR(DBMS_LOB.getLength (obj.getContent())) <> 0 THEN
    DBMS_OUTPUT.PUT_LINE('Document Source: ' || obj.getSource());
    DBMS_OUTPUT.PUT_LINE('Document Name: ' || obj.getSourceName());
    DBMS_OUTPUT.PUT_LINE('Document Type: ' || obj.getSourceType());
    DBMS_OUTPUT.PUT_LINE('Document Location: ' || obj.getSourceLocation());
    DBMS_OUTPUT.PUT_LINE('Document MIME Type: ' || obj.getMimeType());
    DBMS_OUTPUT.PUT_LINE('Document File Format: ' || obj.getFormat());
    DBMS_OUTPUT.PUT_LINE('BLOB Length: ' || TO_CHAR(DBMS_LOB.getLength (obj.getContent())));
    END IF;
    DBMS_OUTPUT.PUT_LINE('----------------------------------------');
    END LOOP;
    EXCEPTION
    END;
    -- create index
    create index my_doc_idx1
    on my_doc(document.comments)
    indextype is ctxsys.context;
    commit;
    alter index my_doc_idx1
    rebuild online
    parameters('sync memory 10m');
    -- searching
    select id from my_doc t
    where contains(t.document.comments,'oracle') > 0
    order by id;
    select id from my_doc t
    where contains(t.document.comments,'application server') > 0
    order by id;
    select id from my_doc t
    where contains(t.document.comments,'index creation') > 0
    order by id;

    Hi,
    Which is best depends on the type of application you are building and the nature of the docs. For simple use with pdf's and word docs I prefer to use bfile or blob which is why I mentioned it. No sense in overcomplicating it.
    My recommendation - look at the interMedia docs and determine if you need the advanced features it provides. I like the application a lot, but am a firm believer in not adding complexity if there is no benefit to be had. Unless you are just playing around with it to learn, I'd recommend matching your project requirements up with what best meets them and go whichever route that is.
    Thanks,
    Ron

  • Search help needed! select box with 2 variables? is it possible

    Using coldfusion 8 and MySQL.  I need to make a search form that has a drop select that displays the department and category together in the drop select.
    Is it possible? what would the form and search query look like. any help would be appreciated. thanks in advance.
    example: each is a line item for the drop select. then when one is selected it returns the results if records are found.
    mens/shoes
    mens/clothing
    mens/accessories
    womens/shoes
    womens/clothing

    Gee, what a coincidence, my current project has one of those.  My approach is to include a concatonated field in the query and use it for the desired attribute of cfselect.
    The details of the contcatonated field depend on the db.  I don't use mySql but if I wanted to know badly enough, I would google "mySql concatonate"

  • How to find all aliases?  Search program needed

    Whenever I try to browse certain types of Web sites with Firefox - and I'm not sure what the common denominator is, but it might be Javascript - the OS tries to connect to an AFP share point on another machine. There's no good reason for it to do this.
    This is apparently a common problem. Google for "AFP Connection Status" and you'll see a lot of reports of "stale" AFP pointers being generated by various Mac programs, which cause this sort of behavior ever after. Solutions invariably involve looking in directories associated with the application, like "Plugins", for stale link alias files.
    I've looked in the obvious places and I can't find it. Now, what I need to do is find (or write) a program which lists ALL the alias files in the system, or, preferably, all the aliases which point to an AFP share point. Because there SHOULDN'T BE ANY. Aliases are, these days, zero-length files with structured information in the resource fork containing the actual information about the file being pointed at.
    Can anyone help by pointing out such a program? The BSD "find" command hasn't been extended (yet) to search file metatdata, it seems, at least not according to the man page. I am no stranger to the Terminal, being an old FreeBSD hand, so UNIX-style solutions are welcome.
    Mac Pro (4-core)   Mac OS X (10.4.9)  

    Had to solve this one on my own. Hopefully people will see this when they Google for it, but this is a general solution to the problem of persistent "AFP Connection Status" popups that won't go away.
    The problem, as others have stated, is that there is an alias somewhere on the system that points to the missing share. The share won't be mentioned in a regular file; the share point's information is located in the resource fork of the alias. What's needed is a way to search the entire file system for any resource fork that mentions the share.
    Here is how to do that:
    # find / -type f -exec grep funkyshare '{}'/rsrc \; -print
    When this command finds the aliases - and there may be more than one - you can delete them.

  • String searching algorithm needed.

    Hi. Am trying to make a simple text editor that includes a search capability. When there is some text on a TextArea, the user can search through the string for some text. So far I have managed the part that the text being searched for is found but when the text being searched for is not present am having trouble.
    Also, I need to be able to highlight or make bold the string if it has been found. Can somebody please help? Thanks.

    The basic idea I use to search is, I have an InputBox object from the Javabook package (http://www.drcaffeine.com/) that gets the string. Then I get the length of that string and that of the main text and use substring() method to search through the main string, the search times decided by the length of the main string. After it has found, I have managed to convert the string ( if found ) to capitals but am defeated to highlight or bold it. Am also out of ideas on what to do if the search string is not found. Am getting errors.

Maybe you are looking for