Ask the Expert

Doing a keyword search within contents of memo field

Would you be kind enough to inform me of a way to do a keyword search inside the contents of a memo field in an Oracle database?

    Requires Free Membership to View

If you are just searching for a specific word in a column, then you can use the '%' wildcard, which standards for any number of characters, similar to the '*' wildcard for DOS or Unix filenames. So to search COL_A from TABLE_A for those rows which contain the word "apache", you would use a query similar to the following:

SELECT * FROM table_a WHERE col_a LIKE '%apache%';
The LIKE operator will search for those columns that are "like" the given phrase, taking into account any wildcards. The '_' wildcard matches one and only one character, similar to the '?' DOS wildcard for filenames. If you are looking into more sophisticated indexes and searching of data, you might want to investigate the ConText option, now called Oracle interMedia. This is an add-on option though.

For More Information


This was first published in August 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: