Search for  a big varchar2 field that contains specific string

Hi to all,
I've created a table with VARCHAR2 column and size of 4000 and a CONTEXT index for it. I use this SQL statement to search for a field that contains a specific word:
SELECT text_body
FROM my_table
WHERE CONTAINS(text_body,'my_word')>0;
this goes so well in SQL plus, so how can I implement this in my form?
Thanks.

Dear Craig,
I installed forms 10g R2 ,besides I corrected a fault in the LOOP syntax.Thanks, The code now is correct with the function CONTAINS. but when I run my form and push the button, my form takes lots of time and return two errors:
frm-41839 "Disc I/O error on temporary record buffer file%s".
and frm-40900 "Unable to locate record buffer. Clear form to continue".
the second error occurs due to memory low space I think.
Dear Morgan,
You are totally right with the function INSTR, but I use the function CONTAINS as it has large capabilities in my search. I even use CTXCAT index instead of CONTEXT index ,with function CATSEARCH but the problem still exists. All of the previous ways run better in SQL but not in forms(without cursor). Suppose I'm wrong with this technique. Is there another way to make such a search?!
This is the new code:
DECLARE
     CURSOR cc IS
SELECT *
FROM my_table
WHERE CONTAINS(MY_TEXT_FIELD,'first_word AND second_word')>0;
copy_cc my_table%rowtype;
BEGIN
     OPEN cc;
     FETCH cc INTO copy_cc;
          LOOP
          :FORM_TEXT_FIELD:=copy_cc.my_text_field;
     EXIT WHEN cc%notfound;
          NEXT_RECORD;
          END LOOP;
          CLOSE cc;
END;
Regards.
Waleed.

Similar Messages

  • Quering on blob fields that contain XML

    Hi All,
    I need to query on blob fields that contain XML data. So I wanna say give me XML docs where ELEMENT[@ATTRIBUTE='VALUE']. So, I need to be able to query on attributes. Is there any way to do that?
    Thanks.

    Thanks for the attempt, but tried what you suggested and it will only pull records where the Asterisk is the ONLY character in that data field.
    Maybe I wasn't clear enough.
    I have in access of 200,000 records in KNA1, out of which some of them have one or more * values in the some of the fileds, eg: Comany ABC At XXXX road Workshop  is stored in the Name 1 field, I want all records like this where * is one of the characters in that field.
    May have to download the entire lot and use Excel to filter.

  • How to call hr_location_api.create_location for different address style with only those fields that belongs specific to  that address style.

    How to call hr_location_api.create_location for different address style with only those fields that belongs specific to  that address style. It should decide at run time means at run time it will come to know the type of address style and based on that only the fields which belong to address details mapped to calling hr_location_api.create_location.
    Thanks in advance.

    You can create a wrapper package on top of the API (hr_location_api.create_location)
    In the wrapper package you set all the values dynamically based on your requirements(say the style and add_line columns are populated on your conditions) and then you call the API.
    Does that not work ?

  • IMovie keeps searching for a clip 01.dv that it cannot find... ever.  How do I make it stop?.

    iMovie keeps searching for a clip 01.dv that it cannot find... ever.  How do I make it stop?

    Don Sherman wrote:
    ....I found the file and moved it to the Movie Events folder. When I try to select it via the Search window within the dialogue box that pops up when iMovie tries to find the file, it appears grayed out, and I cannot select it....
    Where was the file? Was it in one of the iMovie folders or in another folder on your hard drive? From Finder, can you open the file in QuickTime? If so, open the QuickTime Inspector (Window>Show Movie Inspector). What is shown against Format in the Inspector panel?
    You mentioned earlier that you had deleted iMovie's Cache folder (at least I think that is what you meant). I'm not sure how many Events you have, but in Finder try selecting each Event in turn then delete both the iMovie Movie Cache folder and the iMovie Thumbnails folder. When opened, iMovie will regenerate these folders and all the thumbnails. Delete these folders from one Event at a time and try starting iMovie after each deletion. Hopefully, the problem can be narrowed down to one Event.
    Leave all the video clips in the Events folders at this stage. I suspect that it's one of the thumbnails in a single Event causing the problem.
    John

  • E4X : How to get elements that contain a string pattern in the node name?

    Is there a way to extract children from an XMLList where the node name of a child contains a string pattern?
    For example :
    <record>
         <XblahX/>
         <cow/>
         <YblahY/>
    </record>
    How to get the elements of record that have a node name that contains the string "blah"?

    var rec:XML = <record>
         <XblahX/>
         <cow/>
         <YblahY/>
    </record>;
    var r:RegExp = /blah/;
    var elems:XMLList = rec.children().(localName().search(r)>-1);
    trace(elems.toXMLString())

  • Is there a way to Search (List search) for more then one field text from a column for Bulk uploading?

    I've been trying to find more information on this and I apologies if this has already been answered. I just don't know the correct way to ask this. We have a SharePoint List at the company that we have people input information into different columns. The
    problem is most of those information are very repetitive. Is there a way for me to search more then one field text in the column and just input that same information in?
    ex:
    Column 1
    Column 2
    Date:
    883851
    MidWest
    User input 
    8831518
    MidWest
    User input
    On the search field in the SharePoint List, I would need to search for 883851, 8831518 etc,  would view those requested numbers, then I would click edit and change dates to those rows. Does that make sense? I'm sorry I'm fairly new at sharepoint.

    I think what you're asking is about having repetitive options in a list, show up easily for new items being created.
    This can be done by setting the columns that contain repetitive information to Choice fields.  In the configuration of the Choice field, check the box for "Allow custom values".  Now as users are entering data into the list, the dropdown of options
    for a given field grows and users can quickly see and select previously entered and thus repetitive values for the given fields.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • ODBC 8.1.7.7 fails on big varchar2 fields

    I have been using ODBC drivers ver 8.1.7.0 - 8.1.7.3 and 9.0.1.1 on Windows XPpro without any problems.
    It was then brought to my attention that 8.1.7.7 was the only certified version for XP (when it comes to 8i databases I believe). Naturally I tested my program with this version and to my horror found that it did not work!
    I have boiled down the problem to big varchar fields being inserted into tables. It appears that 8.1.7.7 can only cope with 2048 bytes whereas 8.1.7.3 does not have any problem with more than that. The most disturbing thing about it is that a Gpf exception is raised! No neat and tidy ODBC/Oracle error is returned.
    I tried to trace using ODBC trace but trace file simply stops after entering SQLPrepare. Nothing about errors or anything. What plain quiet.
    I also figured that the problem could be caused by the ODBC statement being too big, but including multiple varchar fields of less than 2048 bytes works fine, ie ODBC statement restrictions are not violated.
    Have anybody else experienced this anomali?

    Hi Justin
    You are extremely active on this forum. I truely appreciate it.
    The following SQL snippet demonstrates the problem
    create table test (bigstr varchar2(4000));
    insert into test values ('
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    You may have difficulty finding an ODBC SQL interpretter that will accept this as input due to its size. I have written a simple variant of SQLplus based on ODBC that may be used on any ODBC datasource. I always use it for tests like this. I can easily email it to you.
    I know you requested a code snippet, but since my programs are written in PDC Prolog with binding layers to ODBC you will not gain much knowledge that way. I have tracked the call stack as far as to the Win32 ODBC SQLPrepare call and that is where it fails, so I can say with some certainty that it is not our bindinglayer that fails. It may of course be a faulty parameter/option configuration that triggers the fault and that is why I want to know if anybody else have experience the problem.
    Thank you for your help and interest.
    Michael

  • Search for Blank or find metadata that is empty

    Hello super-intellegent people,
    How do I search for all assets that have no keywords?
    Thanks,
    Jacob

    Unfortunately you can't from the interface. (Send feedback to Apple if you want to have your voice heard.)
    You'd have to script a custom solution to extract all the assets and test for empty keywords fields.

  • Creating custom fields for manual entry and fields that gather data from Active Directory

    So I am no SQL developer but I am being asked to do this.. I've spent the last few days researching but cannot find anything related to my particular situation.
    I have made a copy of the following report to add or modify a few columns:
     Hardware 01A - Summary of computers in a specific collection
    So I have 2 questions:
    How do I create a field that will search the "Managed By" tab in the Computer Properties window in Active Directory.
    How do I create a field that can be manually updated for example: "Date Deployed" or "Deployed By: Analyst"
    I understand I need edit this in SQL report builder and think I know how to create the columns. I believe all I am really asking is.. What are the SQL statements I need to write in order to get this to work?
    I'm sure it's not as cut and dry as I hope it to be so I will be standing by to try to answer any further information that you will want to know.
    thanks!

    Before you can accomplish this you need:
    "Managed by" -attribute has to be added to your Active Directory System Discovery, more on this here: http://technet.microsoft.com/en-us/library/bb693618.aspx
    For "Date Deployed", I'd use a custom Tattoo script in your task sequence to "Tattoo" the installation info in the registry, after that I'd configure the Hardware Inventory to pick that from the registry, more on this here: http://ccmexec.com/2012/08/script-to-tattoo-the-client-registry-during-osd/
    and here: http://www.petervanderwoude.nl/post/reporting-about-the-all-the-different-os-deployment-versions-with-configmgr-2012/
    After those prerequisites, you can start working with SQL reports. More info here: http://myitforum.com/myitforumwp/2012/10/29/sccm-2012-reporting-for-dummies-creating-your-own-ssrs-reports/

  • Search for Special Character in  Oracle Text CONTAINS Query

    Hi,
    We have to write few query which will search for email id in the Oracle Text.
    The Search text will be like <[email protected]> .
    So email id should be searched correctly with the @ symbol.
    Similarly we want the following special character to be searched in the Text like ",',*

    You will need to escape the special characters by either using \ in front of each special character or putting {} around the whole phrase that contains the special characters, as per the online documentation:
    http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cqspcl.htm#CCREF2091

  • Visio Drawing Using Data Graphics with data that has a field that contains Multiple Values.

    I am working on creating a drawing for SMTP connectors.  I decided I would use a Data Graphic connecting to a spreadsheet.  In the spreadsheet there are a few fields that are Multi-Value fields.  For instance SmartHosts contains multiple Ip
    address.  I am trying to get this to format things so that the IPs show on the next line down instead of continuing on the same line until it wraps. 
    Does anyone know a way I could do this?
    Jeff C

    Hi Jeff,
    Arrange the IP values in spreadsheet using Alt+Enter (Use this key pair as a separator between two IP values). Now link this spread sheet to Visio. The values should appear in the same manner in data graphics as your expectation.
    Let me know if you meant something else.
    Thanks,
    Dheeraj 

  • SAP Query: Caseless search for case-senstive dictionary field

    Hi
    I have a question regarding the select options in a sap query. here is the scenario:
    I have a SAP query + infoset. in the selection sreen I have a field from the type MAKTX. this field is a character field that allows upper and lower case. I have the problem that my users provide an input only in lower case e.g. "bottle" and only find the results where bottle is only in lower case. Results with the word "Bottle" they cannot find.
    I am pretty familiar with abap and programing the code to achiev this is not the problem. I just don't know how I can bring my coding and the sap query together. I had 2 ideas:
    a) I make a z-search help and attach it to my select-option in the selection screen. but I don't know if this is possible and where I do that
    b) I put my code into the code-enhancement section in the infoset. but again I am not sure where I have to put it and if there are any restrictions that I have to know....
    c) any other solution will be good as well... maybe somebody has an idea.
    I hope I could make my problem clear. please let me know if you have any idea how I can do that. I don't want to modify the data dictionary object!!.
    thanks in advance - <offer removed by moderator>.
    thanks a lot
    Alex
    Edited by: Thomas Zloch on Oct 6, 2011 8:57 PM

    Use MAKTG instead, in the selection screen. It's has the same value as MAKTX but it's not case sensitive.

  • Searching for addresses in Bcc field

    When I do a search for recipients of my emails (i.e., when I search, then click on the "To" field), recipients of "To" and "Cc" emails show up but not recipients of Bcc emails. Is there anything I can do to have Bcc emails show up when I do a search?

    HI,
    I cant figure out how to go about doing the IMT search with a BLOB in a step-by-step manner or refer me to some notes (a URL) on the net. i cant get examples anywhere about this. I have done this with CLOBs though.
    Thanks!
    Sanjay Hi Sanjay,
    use Inso_filter to index the BLOB, this should work.
    With Inso filtering it is possible to index special Formats like PDF, DOC, HTML, XLS ...
    HTH
    Det

  • Creating a form with a field that contains a simple math problem.

    I am creating a form in Acrobat 9 Standard that contains a field that requires a simple math function (divide).
    if (QuantityRow1 > 0)
    ExtensionRow1 / QuantityRow1
    Take the value input in ExtensionRow1 and divide it by the value in QuantityRow1. I have included an IF statement to prevent an error that occur if QuantityRow1 were equal to zero.
    After inputting the data into the two fields I tab past the field where I expect to see my result and the field remains blank. I don't receive any error messages.
    Any ideas? Thanks - jb

    This is a duplicate of your question on Acrobatusers.com (
    http://answers.acrobatusers.com/Need-simple-math-operation-function-Acrobat-9-Standard-cre ating-form-q142800.aspx
    Did the information provided there not help you with your problem?
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • HT4312 I am trying to install facetime on my macbook but I get a message I need a security upgrade 2010 005.  My search for updates does not show that I need any such upgrade.  What's the deal here?  David

    I am trying to install facetime on my macbook but I get a message stating I am missing a critical security upgrade 2010 005.  However when I search for upgrades the upgrader says I have all current software.  Catch 22.  What do I do?

    Which version of Mac OSX do you have?
    Firefox 2.0.0.20 is the last ever release for Mac OSX 10.3.9 and earlier versions.

Maybe you are looking for

  • Proxy to File using EOIO

    Hi Experts, I have a scenario where I need to send data from SAP to PI so I am using proxy to file scenario. Here i need to send huge amount of data. In some blog i saw that proxy can handle only some maximum amount of data.(but not 100% sure how muc

  • I can't restore my iphone.  when i plug it in, the phone recognizes that it is plugged into itunes, but itunes doesn't recognize it

    My iphone charges when I plug it into my computer, but itunes doesn't recognize that any device is attached (I have the latest version; a pc, not a mac; it's a Verizon iphone).  Also, the phone's info button (which should tell me the serial number) s

  • ITunes won't quit to allow upgrade

    Current iTunes stubbornly refuses to quit. I cannot upgrade to the latest version.

  • Couldn't render the page

    All of a sudden I am unable to download pdf and bank statements. the message "couldn't render the page" keeps coming up. I am running windows vista.

  • MOVIECLIP SLIDESHOW

    Hi, I am trying to create a slideshow that has a 'next' and 'previous' button, which lets you see the next or previous movieclip when you click one of the buttons. I have done the 'next' button but cannot do the 'previous' button, please can someone