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

Can't use command 'decode' or 'nvl' for long datatype.

Status
Not open for further replies.

Wrinn

MIS
Apr 30, 2001
18
0
0
HK
Dear,
I'd like to use the 'decode' or 'nvl' command for long datatype. But the system informs me that 'ORA-00997: illegal use of LONG datatype'.

Does anyone have any ideas?

Thanks,
 

When you use a LONG RAW, you intend to store large data such as sound, image etc., but NVL can only make a substitute for a character or a number, definitely not for this datatype.

I got this from Metalink:

Normal SQL functions do not operate on raws. Use UTL_RAW package to operate on raw columns. To install the package run utlraw.sql script. Also go through utlraw.sql script.


 
In the Oracle 8 Complete reference it says for LONG data type-

"LONG columns may not be used in subqueries, functions, expressions, where clauses or indexes."

Steve
 
Do you really need to use a LONG? If your data is 4000 characters or less, you could use a VARCHAR2.
If your data is longer than 4000 characters, try using a clob instead of a LONG.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top