Truncating a LONG column to fit a PL/SQL LONG var

Truncating a LONG column to fit a PL/SQL LONG var

Post by Morten Primdah » Fri, 22 Mar 2002 01:15:17



Hi. What are the best practices for truncating a LONG
column to fit a PL/SQL LONG variable?

I have a trigger that reads data from a LONG column and
inserts it into a shadow table LONG column. It is not
possible to read the above ~32K fields into the PL/SQL
variable. I'm OK if I just truncate the LONG column
so it fits. Is this possible?

Thanks,

Morten

--
Morten Primdahl         Caput A/S          Phone +45 70 12 24 42
System Integrator       Nygade 6           Fax   +45 70 11 24 42

 
 
 

Truncating a LONG column to fit a PL/SQL LONG var

Post by Morte » Fri, 22 Mar 2002 02:40:24



> Hi. What are the best practices for truncating a LONG
> column to fit a PL/SQL LONG variable?

PROCEDURE COLUMN_VALUE_LONG(c IN INTEGER,
                     pos IN INTEGER,
                     offset IN INTEGER,
                     value OUT VARCHAR2,
                     val_length OUT INTEGER)

Is what I was looking for :)

 
 
 

1. Oracle7 LONG vs. PL/SQL LONG

Hello all...

I'm having some trouble getting at the data in a LONG column.

I understand that the PL/SQL LONG is only 32760 characters long, while
the ORACLE7 LONG is 2 GB or so. Nonetheless, I have to generate a web
page with the contents of my LONG column in it. How do I get at it? Do I
have to resort to another language, or is there some way I can persuade
PL/SQL to deal with it?

I'm using an explicit cursor in a FOR loop. I use the cursor output as
input to htp.tableData calls to generate the web page. It works fine as
long as the data in the column is <= 32760. If I push it to 32761, I get
a value_error exception.

I will use perl (DBI) for this if I have to, but it will be much more
painful if I do. Does anyone know of a way to get around this limitation
in PL/SQL??

Thanks much!

Leslie
--
Leslie Dreyer Kalra
Techies, Inc.

2. permission

3. Long Column Inserts via PL/SQL

4. Need VB OOP Help

5. Manipulating data from long columns in PL/SQL

6. Empty parameter

7. Help: Data in LONG column truncated to 100 chars

8. Help (second Try) SENDMAIL

9. Help: data from LONG column is truncated to 100 chars

10. Long columns that are Long

11. Copying an Oracle Long/Long Raw column

12. Performance issues of long Var Char in SQL Anywhere

13. String too long to fit