-
How to put the LONG data in Condition
Hai,
I have to Put the condition on LONG data.
Condition is like tstlong(filed Name) <> 'TEST';
Thanks & Regards
Bala Krishna.Ravi
-
LONG is obsolete and provided for compatibility with earlier releases. Can you use a CLOB instead? (Note that although you can change a LONG to a CLOB with ALTER TABLE, you cannot change back.)
-
Raavi, ** IF ** you canĀ“t change to LOBs right now, and ** IF ** your longs are smaller than 32 Kb, you can write something like :
reate or replace procedure longsubstr( p_rowid in rowid,
p_from in number,
p_for in number )
return varchar2
as
l_tmp long;
begin
select LONG_COLUMN into l_tmp from T where rowid = p_rowid;
return substr( l_tmp , p_from, p_for );
end;
/
==> and then you can:
select a, b, longsubstr(rowid,35,200) from TABLEwithLONGs
/
if your LONGs are grather than 32 Kb, the procedure will be more complicated, you will need to "break" the LONG in pieces with DBMS_SQL, but it is possible.
[]s
Chiappa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|