Re: how to find particular string from text column
How many different "columns" will you be searching on? If not too many, you should put the values into their own columns (possibly redundantly with the key-value TEXT string you already have).
LIKE 'Selling Agency:Yes'
RLIKE '(^|\|)Selling Agency\s*:\s*Yes(\||$)'
The LIKE version assumes:
* Selling Agency:Yes is not a substring anywhere else.
* The spacing is consistent. Eg, no spacing diffs: "Selling Agency :Yes"
The RLIKE version:
* Is slower
* Makes sure Selling Agency:Yes is exactly bounded by either '|' or start/end of string.
* The spacing must be consistent. Eg, no spacing diffs: "Selling Agency :Yes"
* Allows optional spacing on either side of the ':'.
FULLTEXT is not applicable for this task.
"like is not giving me exact distinct count" -- find a row that is violating your query. (SELECT text ... WHERE text NOT LIKE '...'). It should be obvious what is wrong (such as extra spacing).
Subject
Views
Written By
Posted
7372
May 24, 2010 02:14AM
Re: how to find particular string from text column
4583
May 25, 2010 06:21PM
3809
May 28, 2010 01:24AM
2895
May 31, 2010 11:27PM
2727
May 31, 2010 11:55PM
4835
June 01, 2010 09:02PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.