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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which kind of datatype can I use for about 8000 chars ? 1

Status
Not open for further replies.

ehsant

Programmer
May 14, 2002
188
IR
Hi Everybody ....

I've just started working with Oracle and now I have a problem working with it ...
I want to defin a field to store some bunch of characters in it
as I know I can Use "Varchar2" and it's Max size is about 4000 chars
but I want to store more than this ... ( about 8000 chars )
I have tried "Long" datatype and everything was well till I wanted to use a Query on this field and then the problem appiered

Imagin that the field name is NewsText and the table name is News
the query was like this :

SELECT * FROM News WHERE NewsText Like '%Car%'

And remember that the NewsText Datatype is Long ...

as I run the query I get this Error :

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00932: inconsistent datatypes

and I know that I can't use Long Datatype in WHERE statement ...

now I want to know that is there any datatype Except LOB that I can
store more that 4000 characters in it and I also can use it in WHERE
statement ???

Waiting ...
TNX
E.T.
 
sorry but you will have to use the CLOB datatype. The only thing about CLOB is that you will always use the dbms_lob.* before your character statements:

SELECT * FROM News WHERE dbms_lob.instr(NewsText,'Car',1)>0;

that's it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top