Oracle programming

ora06502

Junior Member
Jan 14, 2008
1
0
0
Hi,

I've created a new page and I would like you to send me any usefull script about Oracle that you consider interesting.

ora-06502

Thanks in advance.
 

lozina

Lifer
Sep 10, 2001
11,711
8
81
Here's something I just ran when I needed to find out length of BLOB data

Edit: Damn what did Attach Code do to my linebreaks? nasty

DECLARE
theblob BLOB;
length INTEGER;
BEGIN
SELECT RN_EVT_DATA INTO theblob FROM RN_EVT WHERE RN_EVT_ID = 181;
length := dbms_lob.getlength(theblob);
IF length IS NULL THEN
dbms_output.put_line('NULL');
ELSE
dbms_output.put_line('Length of Blob is: ' || length);
END IF;
END;
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Here's a little script I run when I need to drop a dev database:

SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET MARKUP HTML OFF
SET ESCAPE
SPOOL DELETEME.SQL
select 'drop table ', table_name, 'cascade constraints \;' from user_tables;
SPOOL OFF
@DELETEME
SPOOL DELETEME_SEQ.SQL
select 'drop sequence ', sequence_name, '\;' from user_sequences;
SPOOL OFF
@DELETEME_SEQ
commit;