Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search long data type

Status
Not open for further replies.

bergis

Technical User
Jun 21, 2001
42
GB
Hi,
I know this might be the wrong forum to ask, but since I haven't gotten any answers in the other forum I posted this question in I try anyway:
I have a table with a field that contains description of ongoing operations. This is a LONG data type field (bear with me, I'm not well into all the correct terminology..).
I want to search this field for occurrences of spesific words. I've done this in Access, syntax is like this:

WHERE OPSUM.OPER LIKE "*word*"

But i want to do the same thing in the oracle database. I've tried different syntaxes (i.e replacing "* with other symbols like '%) but all I get is different variants of this error message: ORA-0932: Inconsistent data types.

So, does anyone know of a simple way of searching an text string in a LONG data type field in an oracle db for spesific words?

thanks
Kjell
 
A Long Data type is a number. I'm not sure I understand why your searching a LONG field for alpha-numeric characters. I'm not familiar with Oracle but I'm fairly sure your error lies in the fact that matching a number field with a string is a Incompatible Data Type Conversion Error.

If your field holds text then you need to set it's data type to text.
 
Hi,
someone has (fortunately) answered my original question in the oracle 8 forum.
The thing is that Access don't have LONG data type as Oracle has, and it is text, not numbers. Size of this data type is 2147483647 (yes it is). The reason why I can't search it for a particular word is that this data type can't appear in a WHERE clause.

Kjell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top