Problem with Long datatype [message #37964] |
Sat, 09 March 2002 00:29 |
sushmita
Messages: 2 Registered: March 2002
|
Junior Member |
|
|
I thank you all in advance
I have a table which has column of type long
this column has certain descriptive text.
I want to search for those records which
has the word 'drilling'
The following query gave the error
select irs_ir_number,ir_number,ship_name from sn_ships
where upper(notation_description) like upper('%drilling%');
ERROR at line 3:
ORA-00932: inconsistent datatypes
Please can you find any solution .
it is very very urgent
Thanks a lot again
|
|
|
Re: Problem with Long datatype [message #37965 is a reply to message #37964] |
Sat, 09 March 2002 18:51 |
jagjeet singh
Messages: 16 Registered: October 2001
|
Junior Member |
|
|
hi ..
we can not use directly and standard function (substr,instr,like) with long ..
declare
V_text varchar2(32000);
begin
for i in (
select upper(notation_description ) notation_description ,
irs_ir_number,
ir_number,ship_name from sn_ships
) loop
v_text := i.notation_description ;
-----
if instr(v_text,upper('drilling')) > 0 then
--- mean text found
-- ur logic here
---
end if;
------
end loop;
end;
if ur long column is less then 32000 characters
it will only work then.
|
|
|