How to specify varchar size more than 4000?

Hi:
I want to declare the field as varchar, but the required size for that field is 10,000.
So how i can do this?
Can any body help me?
Thank You,
Anup

You're thinking that because a CLOB can store GB, then it will store GB even if you shove a few bytes in there?
That's not the case.
There are other considerations for CLOBs - inline/outofline/cache settings/securefiles (LOB 2.0) in 11g, etc.
But CLOB is what you want.
See:
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements001.htm
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_7002.htm#BABHDBGB

Similar Messages

  • How to perform Text length more than 4000 bytes

    I want to read each row from txt file
    and used utl_file pacage to concat contents into a variable,
    the variable datatype is varchar2(4000), so text length can't more than 4000 bytes,
    but I wish get full text from txt file, How can I do?

    Thans! Detlev.
    I have a code :
    PROCEDURE read_file( path in varchar2, filename in varchar2, msg in out varchar2) AS
    data_line varchar2(4000);
    ifile utl_file.file_type;
    BEGIN
    ifile := utl_file.fopen(path,filename,'R');
    LOOP
    utl_file.get_line( ifile, data_line);
    msg := msg | | rtrim(data_line);
    END LOOP;
    utl_file.fclose(ifile);
    EXCEPTION
    WHEN no_data_found THEN
    utl_file.fclose(ifile);
    END;
    My question is
    1. The msg length can't more than 4000
    2. I use utl_raw.cast_to_raw function, that can't cast varchar2 to raw if varchar2 length more than 2048
    3. If I want to change the data type varchar2 to raw,
    the utl_raw.concat function can't use Loop ....end loop clause,
    So that only use utl_raw.concat(ra1, ra2,ra3,ra4,ra5, ... ra12)
    I want to concat all line to a raw datatype from text file , How can I do?

  • How to Handle the Strings more than 4000 characters in OBIEE 11g

    Hi Folks,
    I have a derived column in RPD where there are like bunch of case statements which involve the columns from 2 or more dimensions. Now I am getting an error ORA-01489: result of string concatenation is too long at OCI call OCIStmtFetch.
    How can we handle this in OBIEE? I have tried the below option that is provided in the below link but I think this work only if it is a single column but in my case it is derived column.
    Please suggest.
    Thanks,
    Bharath

    Bharath,
    Can you try using CLOB function.Check the below URL.Not sure if it helps you.
    sql - LISTAGG function: "result of string concatenation is too long" - Stack Overflow
    Thanks,
    Sasi Nagireddy.

  • How to transfer my iphone video to computer,the video siza more than 1.5G

    how to transfer my iphone4 video to computer. the video siza more than 1.5G

    Follow the instructions here or here, and then sync the iPhone with the iTunes library containing the content.
    (112570)

  • How can I make Function return varchar2 more than 4000

    I have a function
    FUNCTION testing (v_pk_application in number, v_inccharges in char)
    return varchar2(30000)
    --return number
    is
    v_net_sum varchar2(30000);
    v_net_sum2 varchar2(30000);
    v_datarow varchar2(3000);
    v_datarow2 varchar2(3000);
    begin
    return v_net_sum;
    end;
    I want to return varchar2 more than 4000, how can I do that.
    Thanks

    user10659388 wrote:
    I want to return varchar2 more than 4000, how can I do that.A function can return a string up to the maximum allowed for varchar2.
    Varchar2 can be up to 32767 characters...
    SQL> create or replace function ret_str return varchar2 is
      2    v_str varchar2(32767);
      3  begin
      4    v_str := lpad('*',32767,'*');
      5    return v_str;
      6  end;
      7  /
    Function created.
    SQL> declare
      2    v_retstr varchar2(32767);
      3  begin
      4    v_retstr := ret_str();
      5  end;
      6  /
    PL/SQL procedure successfully completed.However, SQL only supports varchar2 up to 4000 characters so the same function will cause SQL to error, even though the function is perfectly valid.
    SQL> select ret_str() from dual;
    select ret_str() from dual
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SCOTT.RET_STR", line 5
    SQL>So, if you intend to use the function only in PL/SQL then you can use varchar2 up to 32767 characters, but if you intend to use it in SQL then you will be limited to returning 4000 characters. Alternatively you can return a CLOB which SQL supports but they are a little more tricky to work with than varchar2...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function ret_str return clob is
      2    v_str clob;
      3  begin
      4    v_str := lpad('*',32767,'*');
      5    return v_str;
      6* end;
    SQL> /
    Function created.
    SQL> select ret_str() from dual;
    RET_STR()
    SQL>

  • Cannot create graph with more than 4000 rows or colume

    need some help.
    im trying to plot a graph using the report generation toolkit and i got this error and it say it cannot contain more than 4000 rows or columns
    is it that there is a limit? if there is, how can i increase?
    im trying to plot a graph using my data from excel which has over 10000 rows of data

    I use this VI to read excel and to write a graph report.
    in my excel, which i have attached, there's all data with about 11000 row.
    i want to use it to plot a graph and i kinda stuck at here where there is this limit of 4000 row? and i can't seem to get the header i have link in the block diagram to the graph either.
    Attachments:
    excel.xls ‏837 KB
    Read_excel_G_word_report.vi ‏34 KB

  • Plotting of graph with more than 4000 data points in Excel

    Hi All,
    I am fairly new to labview world. I am trying to plot out line graphs of the results from my program into Excel worksheet. I have huge set of data points(10000) stored in each of 10 different worksheets in MS Excel workbook. I am trying to compile results into last sheet as graphical representation of all the various dataset into 10 different graphs.
    My problem is that I am getting error because MS Graph does not allow me to plot more than 4000 rows or datapoints. Is there better and cleaner way of programming this? Or if some one can provide an example of how to handle such case. I'll appreciate any help.
    My goal is to able to plot one set of data 1st then I will be able to run through various worksheets to compile into standalone results.
     ERROR MESSAGE: "Report Generation Toolkit: Graphs you create or edit in Microsoft Graph cannot contain more than 4,000 rows or columns, including row and column headers. "
    Also for example if we run Line Graph example and change the # of data points from 100 to 4000, we get same message.
    Error -41114 occurred at NI_ReportGenerationToolkit.lvlib:Excel_Insert_Chart.vi -> NI_Excel.lvclass:Excel Insert Graph.vi -> Line Graph (Excel).vi
    Thanks,
    Saurabh

    Hi Dennis,
    I am collecting waveform data from oscilloscope using labview in both data & graph format. So my program collects data for a particular operating condition & then saves the data on a worksheet. After it loads new operating condition & goes over same cycle. I have to save all the data points in excel for different use cases, which I am saving in different worksheet for each specific operating condition.
    Since I already have data saved in excel at the end of test, I am trying plot each use case in the same report for study & presentaion after tests are finished. I have not been able to do so. I read the post which you have mentioned, seems like newer excel or labview version have same issue. I am using LV 9.0
    I will try using decimation but if you have any better way of handling this problem, I'll appreciate if you can share that.
    Thanks for your help.

  • ORA-01704:String literal too long with update of more than 4000 chars

    Hi,
    I want to update a table column in Oracle Database(version 10) with more than 4000 chars.
    The datatype of the table column is NCLOB.
    I want to achieve this with one single line of update query as below,
    update mytable set MY_DESCRIPTION = 'longdesc' where ID = '111' ;
    But there's a problem, if the 'longdesc' is more than 4000 chars, it gives the error , "ORA-01704:String literal too long"
    How can I achieve this in sql developer ?
    I dont want to do this using stored procedures, I want to do this update using only sql statement.
    Please help.
    thanks,
    sudhakar

    Hello Sudhakar,
    I am afraid, this will never work by SQL.
    Just because an SQL-Statement must not contain a string literal over 4,000 characters (or did that change lately?).
    Maybe you can bypass the limit with PL/SQL ... but you will certainly run into the 32K limit sooner or later
    regards
    Peter

  • Need to insert into a table 1 of the fields (CLOB)with more than 4000 chars

    Dear Gurus,
    As far I understood, I need to write a function which get as parameter the large text and using bind variables I can return a CLOB containing more than 4000 chars. I tried all I can do and feel I want to died. Please, can I get specified help in this issue?
    I APPRICIATE YOUR HELP, MARCELO.

    *** Duplicate Post ***
    Please, Marcelo, use the forum properly. Pick a single group and post there.
    Thank you.

  • Handling xml message of size more than 100mb in SAP PI 7.1

    Dear Experts,
    Is it possible for PI to pick-up and process a XML message of size more than 100 MB in PI 7.1 EHP-1?
    If yes, can you please let me know how to handle it?
    Thank  you.

    Hi Saravana,
    it is not a best practice to more than 100mb..
    you can increase below parameters and so that you would be able to process for the best..
    u2022     UME Parameters :  May be we need to look into the pool size and poolmax wait parameters - UME recommended parameters (like: poolmaxsize=50, poolmaxwait=60000)
    u2022     Tuning Parameters:  May be we need to look/define the Message Size Limit u201Clike: EO_MSG_SIZE_LIMIT = 0000100u201D under tuning category
    u2022     ICM Parameters: May be we need to consider ICM parameters (ex: icm/conn_timeout = 900000. icm/HTTP/max_request_size_KB = 2097152)
    Thanks and Regards,
    Naveen

  • Writing to db more than 4000 characters

    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 saying, data size is greater than the maximum value of this type...
    this is an sqlexception

  • Need ouput more than 4000 characters

    Hi , how to create a script that fetches more than 4000 charaters in the ouput

    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 ..

  • Insert more than 4000 characters using sql plus

    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 more than 4000 characters using the app) - how do I achieve this in a SQL script?
    Any help is much appreciated.
    Cheers,
    Steve

    Hi,
    This pl/sql block works absolutely fine in SQL*Plus inserting > 4000 characters into clob column:
    declare
    l_str varchar2(8000);
    l_str1 varchar2(2400) := 'first part of the verly long string...';
    l_str2 varchar2(2400) := 'second part of the verly long string...';
    begin
    l_str := l_str1 || l_str2;
    insert into tmpl values (l_str);
    end;
    So, you'll have to replace inserts with pl/sql blocks in your script.
    Tested in Oracle 8.1.7.0.0
    Regards,
    Andrew Velitchko
    BrainBench MVP for Developer/2000
    http://www.brainbench.com

  • Why can't  owa_text.vc_arr  handle the string with more than 4000 characters?

    I am using PL_SQL with Oracle8i and OAS 4.0 web server.I want to
    use owa_text.vc_arr to pass the inputs in serval text areas in the form on a web application.
    If the input string length is less than 4000 characters, everything works fine.However when the strings are longer than 4000 characters but less than the max length 32767 characters, I got this error message:
    OWS-05101: Execution failed due to Oracle error 2005
    ORA-02005: implicit (-1) length not valid for this bind or define datatype.
    In the Oracle Application Server 4.0 documment, it says
    about owa_text.vc_arr :Type vc_arr is table of varchar2(32767)
    index by binary_integer. It means that owa_text.vc_arr can handle multiple strings and each string can have up to 32767 single byte characters, is it right?
    Owa_text.vc_arr is supposed to handle the string with more
    than 4000 characters, is it true? Could anyone tell me why? Any
    help will be greatly appreciated!!!
    Thanks very much.
    Helena Wang
    Here is the pl_sql procedure to create my form on the web:
    PROCEDURE myform
    IS
    BEGIN
    htp.p('
    <form action="'||service_path||'helena_test.saveform3"
    method=post>
    <input type=hidden name=tdescription value="X">
    Input1: <textarea name=tdescription rows=50 cols=70
    WRAP=physical></textarea>
    Input2: <textarea name=tdescription rows=50 cols=70
    WRAP=physical></textarea>
    <input type=submit name=WSave value="Save">
    </form>
    END;
    /***** here is the pl_sql procedure which I use to save the
    form***/
    procedure saveform3(tdescription in owa_text.vc_arr,
    WSave in varchar2 default 'No')
    is
    len pls_integer;
    begin
    for i in 2..tdescription.count loop
    len := length(tdescription(i));
    htp.p(len);
    htp.p(tdescription(i));
    end loop;
    end;

    The maximum size of a VARCHAR2 field in Oracle 8i is 4000 bytes.
    you'll ned to use a LOB type (or LONG if you prefer the old way)

  • Load and Read XML file size more than 4GB

    Hi All
    My environment is Oracle 10.2.0.4 on Solaris and I have processes to work with XML file as below detail by PL/SQL
    1. I read XML file over HTTP port into XMLTYPE column in table.
    2. I read value no.1 from table and extract to insert into another table
    On test db, everything is work but I got below error when I use production XML file
         ORA-31186: Document contains too many nodes
    Current XML size about 100MB but the procedure must support XML file size more than 4GB in the future.
    Belows are some part of my code for your info.
    1. Read XML by line into variable and insert into table
    LOOP
    UTL_HTTP.read_text(http_resp, v_resptext, 32767);
    DBMS_LOB.writeappend (v_clob, LENGTH(v_resptext), v_resptext);
        END LOOP;
        INSERT INTO XMLTAB VALUES (XMLTYPE(v_clob));
    2. Read cell value from XML column and extract to insert into another table
    DECLARE
    CURSOR c_xml IS
    (SELECT  trim(y.cvalue)
    FROM XMLTAB xt,
    XMLTable('/Table/Rows/Cells/Cell' PASSING xt.XMLDoc
    COLUMNS
    cvalue
    VARCHAR(50)
    PATH '/') y;
        BEGIN
    OPEN c_xml;
    FETCH c_xml INTO v_TempValue;
    <Generate insert statement into another table>
    EXIT WHEN c_xml%NOTFOUND;
    CLOSE c_xml;
        END
    And one more problem is performance issue when XML file is big, first step to load XML content to XMLTYPE column slowly.
    Could you please suggest any solution to read large XML file and improve performance?
    Thank you in advance.
    Hiko      

    See Mark Drake's (Product Manager Oracle XMLDB, Oracle US) response in this old post: ORA-31167: 64k size limit for XML node
    The "in a future release" reference, means that this boundary 64K / node issue, was lifted in 11g and onwards...
    So first of all, if not only due to performance improvements, I would strongly suggest to upgrade to a database version which is supported by Oracle, see My Oracle Support... In short Oracle 10.2.x was in extended support up to summer 2013, if I am not mistaken and is currently not supported anymore...
    If you are able to able to upgrade, please use the much, much more performing XMLType Securefile Binary XML storage option, instead of the XMLType (Basicfile) CLOB storage option.
    HTH

Maybe you are looking for

  • 2 Dimensions and a Fact - Join Paths

    I have a scenario and I have been racking my brains out as to if what I am looking for could be set up. I have two dimenisions - Region and System - each System belongs to a Region. So the System Dimenison contains a Region_Key. I have a Fact table t

  • Export Project puzzle

    There's something about Export Project I obviously don't understand. I have two small JPG-based projects, one (57 images) referenced, the other (77 images) managed in the Aperture library. On Export Project, for either one, I can check or uncheck "Co

  • TextFields in Custom Class

    I trying to create a TextField in a Actionscript file, But when I try to create an instance of the class in flash no textfield is appearing. Am I doing this correct? package parts{      import flash.text.TextField;      import flash.text.TextFormat;

  • Getting SQLSTATE:22001(Message : [Microsoft][SQL Server Native Client 11.0]String data, right truncation) in SQL Server 2012 but in SQL server 2008 R2.

    I have an application which connects to SQL through ODBC 11. ODBC statement is : SELECT PID FROM PENTITY PENTITY01 WHERE ((NUM1 NOT BETWEEN ? + 10.7895 AND ? + 200.6734 AND NUM2 NOT IN (5996/ 8, ? - 89.3892, ? + 80.7543)) and the SQLBindparameter sta

  • Whether there is a facility available to know chat...

    Hi   I have created a skype manager account for my company and have provided the accounts to all my employees. I want to keep an eye on the all of these members by the way of logging their skype chats in the manager account. Is this possible?