Home > Default > Need ouput more than 4000 characters

Need ouput more than 4000 characters

November 30Hits:0
Advertisement
Hi , how to create a script that fetches more than 4000 charaters in the ouput

Answers

declare your pl/sql variable as varchar2(32767) which is the maximum and then you can select that amount.Not so fast Blu ;)
SQL>  create or replace function f
return varchar2
as
begin
return lpad ('x', 32767, 'x');
end f;
Function created.
SQL>  exec dbms_output.put_line(length(f))
32767
PL/SQL procedure successfully completed.
SQL>  select length (f) from dual
select length (f) from dual
Error at line 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "MICHAEL.F", line 5To SELECT more than 4000 chars you'll always need a CLOB ..

Read other 6 answers

Tags:

Related Articles

  • Need ouput more than 4000 charactersNovember 30

    Hi , how to create a script that fetches more than 4000 charaters in the ouputdeclare your pl/sql variable as varchar2(32767) which is the maximum and then you can select that amount.Not so fast Blu ;) SQL>  create or replace function f return varcha

  • Selecting the first 4000 characters from a tag in an xml fileOctober 11

    Oracle Enterprise Edition 11.1.0.7 64 bit (Jan 2012 CPU applied) Windows 2003 64 bit We have an XML file with the following sample format. <?xml version="1.0"?> <HR> <EMP> <FNAME>JOHN</FNAME> <LNAME>DOE</LN

  • Greater than 4000 characters in OBIEE 11gOctober 11

    Dear all, I have a table, just one column. In Analysis, I designed a table with this column content the data as text greater than 4000 characters. Can I show all of them in OBIEE ? Can I change the column datatype? Anyone help me to resolve this issu

  • Cannot insert more than 4000 characters using PL/SQL SP  to LONG columnsOctober 11

    I have created a stored procedure which will insert more than 4000 characters in a table having long column. The stored procedure body is as follows : CREATE OR REPLACE PROCEDURE INSERTTOTEST(P_ZUNIQUEID IN  VARCHAR2,P_LONGVAL  IN LONG) AS BEGIN inse

  • Query in 10g DB gives error when size of element exceeds 4000 characters?November 30

    I used this query give in this thread Need help in reading a _fmb.XML and writing the item properties to a table select x1.item_name      , x1.item_type      , x2.property      -- to convert back entities such as to their character values :      , ut

  • Writing to db more than 4000 charactersNovember 30

    Hi, i want to store a text with more than 4000 characters in an oracle database. i can't use varchar2(4000) what should i use? blob? clob?there is some kind of a problem here a want to store a text with 29212 characters, but there is an error message

  • Column with more than 4000 charactersNovember 30

    Hi, Version: 10.2.0.4.0 I have a requirement to display more than 4000 characters (clob, long data type) through sql. Though this can be achieved through pl/sql, I am not able to get the output in sql statements. Is it possible to get this done throu

  • Parameter longer than 4000 charactersNovember 30

    The java layer calls a EXEC_DDL stored proc that does a EXECUTE IMMEDIATE on the VARCHAR2 parameter string passed in. SInce the java layer is passing more than 4000 characters DDL statement we get an error about cannot bind long ..... What datatype s

  • Displaying more than 4000 charactersNovember 30

    Hi I have a report which would display a CLOB field having text of length around 32000 characters. I tried to use DBMS_LOB.SUBSTR(<field_name>,32000,1) on the query so that it shows the text at least till 32000 characters on the report but it keeps

  • Insert more than 4000 characters using sql plusNovember 30

    I have a SQL script that creates a database. The problem is that some of the fields are longer than 4000 characters in the INSERT statement and Oracle doesn't seem to like it. The field is a clob and works fine in the application (i.e. I can insert m

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.462 s.