PLSQL - Output a long string to screen

I am trying to create an XML file, but I don't have FTP access on the server, only read rights.
So I need to output a long string on the screen.
By using the
DBMS_OUTPUT.PUT_LINE ('<Environment> ' || long_string_01 || long_string_02 || '</Environment>');
I get the 255 buffer error.
Whats the easiest way around it?
Thanks in advance everyone!
Edited by: 866635 on Aug 5, 2011 5:16 AM

Hi,
I agree with Mr Robertson.
SQL> SET SERVEROUTPUT ON SIZE 1000000
SQL> SET LONG 1000000000 LONGC 1000000000
SQL> set pagesize 200
SQL> select TO_CLOB('When I use a LONG setting smaller than the length of the TEXT column,
  2  I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
  3  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
  4  When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
  5   TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
  6   result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
  7  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
  8  When I use a LONG setting smaller than the length of the TEXT column,
  9  I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
10  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
11  When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
12   TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
13   result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
14  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
15  When I use a LONG setting smaller than the length of the TEXT column,
16  I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
17  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
18  When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
19   TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
20   result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
21  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
22  When I use a LONG setting smaller than the length of the TEXT column,
23  I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
24  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
25  When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
26   TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
27   result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
28  When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
29  When I use a LONG setting smaller than the length of the TEXT column,
30  I got it truncated. When I use a huge LONG setting but a  setting smallerthe length of the TEXT
column, I got it wrapped. When both are huge, it seems I am getting ') from dual
31  /
TO_CLOB('WHENIUSEALONGSETTINGSMALLERTHANTHELENGTHOFTHETEXTCOLUMN,IGOTITTRUNCATED
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a  setting smallerthe len
gth of the TEXT column, I got it wrapped. When both are huge, it seems I am gett
ing
SQL>

Similar Messages

  • I need to delete a text that keeps locking up my iPod. The text contains a long string of emojis (a bunch of ant symbols).  It keeps locking up the iMessage screen.  Was doing it on my iPhone to

    I need to delete a text that keeps locking up my iPod. The text contains a long string of emojis (a bunch of ant symbols).  It keeps locking up the iMessage screen.  Was doing it on my iPhone too. How do I delete an old text that keeps trying to come through my apple Id?
    Thanks?

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • Strings on Screens

    I have a requirement to have a STRG type element on a screen.
    I wish to populate this field with data that is longer than the visible length of the field but as the field is scrollable (greyed out checkbox) and does indeed allow me to scroll I thought I would be able to pass in a string of any length.  This does not seem to be true as if I go over a certain amount of characters the program dumps with a 'field too short' error.
    Has anyone had much experience with strings on screen?
    Thanks in advance
    Ian

    Hi all,
    I have been following this topic and I still have one question unanswered. I get a syntax error when I use something like this in my code...
    =====================================
    parameters p_test type string.
    =====================================
    The error message reads as "The deep data type "STRING" is not allowed.
    The SAP Help Documentation says "It is not yet possible to use strings in screens or database tables. However, strings can be stored in database tables as clusters using EXPORT and transferred using IMPORT".
    I'm using <u><b>SAP WebAS 6.20</b></u>.
    Any thoughts on this ?
    Regards,
    Anand Mandalika.

  • How to insert a very long string into a column of datatype 'LONG'

    Can anyone please tell me how can I insert a very long string into a column of datatype 'LONG'?
    I get the error, ORA-01704: string literal too long when I try to insert the value into the table.
    Since it is an old database, I cannot change the datatype of the column. And I see that the this column already contains strings which are very long.
    I know this can be done using bind variables but dont know how to use it in a simple query.
    Also is there any other way to do it?

    Hello,
    To preserve formatting in this forum, please enclose your code output between \ tags. And when executing you code as a pl/sql or sql script
    include following lineset define off;
         Your code or output goes here
      \Regards
    OrionNet                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Put_line long string

    Hi guys
    I am trying to ult_file.put_line a long string ~maximum 5000 characters to a file. I think i have exccess the default limit and receive an error. So i extend the maximum character per line by override the utl_file.fopen method. After that it stopped the error, but the output characters are all non readable characters - 扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡扡
    Could someone suggest me a solution to insert my long string?
    Thank you
    Bryan

    Procedure Write_to_file(filename in string, orderid in number, orderversion in number) is
    f SYS.Utl_File.file_type;
    tmporderid number(10);
    tmporderversion number(10);
    str string(1032);
    begin
    tmporderid := orderid;
    tmporderversion := orderversion;
    f := utl_file.fopen('EXPORTDIR2',filename,'W');
    FOR s in
    (Select SAP_STRING1
    FROM BSACC_V_SAP_TABLE_2
    where OrderId = tmporderid
    AND OrderVersion = tmporderversion )
    Loop
    utl_file.put_line(f,s.sap_string1||chr(10));
    end loop;
    utl_file.fclose(f);
    end;
    Window XP professional English
    Oracle 10g

  • I just installed Mozilla Firefox 3.6. This is the first time have have installed Firefox. My problem is I no longer have the screen which lists which plugins need updating and researching. How can I find out which plugins need updating or researching?

    After installation it told me to update or research several plugins. I updated Silverlight and JAVA. I was instructed to shut down and restart my computer to test the JAVA installation. I did this and the installation is fine. At this point I no longer had the screen with the list of plugins that need updating or researching.

    THis is probably the page you saw.
    http://www.mozilla.com/plugincheck/
    You can also access it from the Firefox menu by clicking "Tools -> Add-ons -> Plugins" and then clicking the Find Updates button at the bottom.

  • How can i  display output in the same selection screen?

    I've a requirement. Suppose in my selection screen there are three input fields. On the basis of this selection screens input It will  display the output in the same selection screen. Can it be possible? .
    Can it be possible to modify the default screen no for the selection screen 1000?
    Thanks in advance.
    Abhijit

    Hi Abijit,
    Whatever changes made in STANDARD SELECETION SCREEN 1000 or screens generated using 'SELECTION-SCREEN' statements, are not permanent.
    It will get back to its original appearance, while you execute again or some time later.
    Whenever you get into 'CHANGE' mode of these screens, an information will be displayed as follows ;
    Selection screen: Report generation makes screen
    changes ineffective
    Regards,
    R.Nagarajan.

  • Is there an easy way to convert a long string into an array?

    I can convert a long string into a 1-d array by parsing and using build array, but I would like to know if there is a function to make this easier.
    For example:
    from/   aaaaaaaabbbbbbbbccccccccdddddddd         (string of ascii)
    to/       an array that is 1-d with each element having eight characters
              aaaaaaaa
              bbbbbbbb
              cccccccc
              dddddddd
    Thank you.
    Solved!
    Go to Solution.

    Try something like this:
    (If you can guarantee that the string length is an integer multiple of 8, you an drop the two triangular modes in the upper left. )
    Message Edited by altenbach on 03-14-2010 06:40 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ChopString.png ‏9 KB

  • Inserting long string into Oracle

    When my code inserts about 5K character into a table, I got an error message saying that the Oracle could only handle 4K character. I am currently looking at LOB but havn't had a clear idea yet. Could someone give me some help on this? According to the sample code, I will have to use Oracle JDBC driver for LOB. But we are using BEA's Kona driver for all JDBC connections. Is there an easy way to insert long string?

    hii
    nams u solve ur problem using setCharacterStream method
    but it does't work if the string more than 4000 char
    raises "java.sql.SQLException: Protocol violation"
    here's the code
    PreparedStatement ps = con.prepareStatement( "UPDATE candidate SET cv_new = ?");
    StringReader cvReader=new StringReader(cv_new);
    int abc=cv_new.length();
    ps.setCharacterStream( 1, cvReader, abc);
    ps.executeUpdate();
    is that any problem in that code or it's a jdbc driver broblem ??
    i'm using classes 12.zip
    thanks

  • Ipod touch wont turn on i tried restoring it but every time i do it just says its waiting for the ipod to respond. meanwhile my ipod is no longer a black screen but the apple logo with a loading bar underneath that after leaving for 8 hours hasnt moved.

    my ipod touch wont turn on ive tried restoring it but every time i do it just says its waiting for the ipod to respond. meanwhile my ipod is no longer a black screen but the apple logo with a loading bar underneath that after leaving for 8 hours hasnt moved.

    Try:
    - Another cable
    - Another USB port
    - Reboot the computer
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • On my 2012 MBP I can no longer use dual screens/HDMI after upgrading to 10.8.2. I'm using Moshi Thunderbolt adapter

    On my 2012 MBP I can no longer use dual screens/HDMI after upgrading to 10.8.2. I'm using Moshi Thunderbolt adapter

    I think you are sailing in uncharted waters with those kind of modifications.
    I am only guessing, but if you have not already done so,  do a PRAM reset and then trash your FCP preferences.
    Big Poppa Chris wrote:
    I've also notice when I start the computer up, it stays on the grey screen longer than it did when I had the original card (512 mb).
    My understanding is the Mac is doing a ram/hardware test during the grey screen, if the card you added had additional memory, then it is very likely the test will take longer - but I am no hardware expert.
    MtD

  • How to find out if a long String has a "subString" twice or more.

    I need to find out if a long String has the same number twice or more.
    I need to look matches for numbers running from 000, 001....999 and if a number is found twice or more, return that number and lines there were found.
    example String:
    -;000 ; 1 ; 2006-12-11 ; -; job;
    x;001 ; 2 ; 2006-12-11 ; 2006-12-12; do this
    -;002 ; 3 ; 2006-12-11 ; -; work
    -;003 ; 0 ; 2006-12-11 ; -; some
    -;004 ; 2 ; 2006-12-11 ; -; thing
    x;005 ; 1 ; 2006-12-11 ; 2006-12-11; reads
    -;003 ; 0 ; 2006-12-11 ; -; here
    Should return from example String:
    003 at lines 4 and 7
    Any ideas?

    So there are newlines in the String?
    You could use a StringTokenizer to break the String into lines, then searching on each line if it contains any of the search strings. (You need to clarify if a line can contain more than one search string).
    Probably you should use a Map<String, Integer> to record the searchcounts.
    Or an int[] Array if you are really sure that the Strings you search for really are numbers.
    Another option is to use:
    LineNumberReader lnr = new LineNumberReader(new StringReader(searchString));This will save you from explicitly having to take care for the line number.
    In any case your example looks like the individual lines are semicolon separated fields and the numbers you search for always are in column two.
    So after breaking up the original String in lines, you could use another StringTokenizer to break up the line in fields.

  • In report layout, can format a long string display as Column mode?

    Hi,
    Just want to check in report builder any way can format a long string into a column mode?
    Example: I have a field to hold 8000 character, and would like to print
    30 character in each line, when reach 50 line, then print in column i/o to print next page?
    Any idea ? Thanks a lot if you can share your experience with me.
    best Regards,
    Klnghau

    hi let say your field name is x
    then if your want it word wrap then it's simple just get one field and make it's vertical
    elasticity variable. and asign the field to it..
    but if you want your field to be displayed as
    first colunm and then beside continuation of that column but in 2nd one...
    then create 2 formula columns make your field legth been distributed half in each.
    so cf_1 is:
    decalre
    t varchar2(1510);
    begin
    if length(:x) > 1500
    t := substr(x, 1, 1500); -- as 30 x 50 = 1500
    else
    t := :x;
    end if;
    return t;
    so cf_2 is:
    decalre
    t varchar2(1510);
    begin
    if length(:x) > 1500
    t := substr(x, 1500, length(:x)-1500); -- as 30 x 50 = 1500
    else
    t := '';
    end if;
    return t;
    and then in design view
    field1 field2
    for field1 source is cf_1 and
    for field2 source is cf_2
    that's all
    Enjoy Oracle...

  • After recording text using the dragon dictation app, it is converted, it can be copied to the iOS system clipboard for use in any app, how does the user access the clipboard to retrive this information if it is no longer on the screen?

    after recording text using the Dragon dictation app, it can be copied to the iOS systme clipboard for use in any app, how does the user access the clipboard to retrive this information if it is no longer on the screen?

    You need to do a long-press in any data entry field, then select Paste.

  • Problem in displaying long string in JTextField

    Hi All,
    I got problem in displaying long String in JtextField. It does center alignment & I can see middle part of string where length of JTextfield is 6 char. How can I do left alignement so that I can see starting 6 character?
    --Harish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    you may try this:
    yourTextFieldName.setHorizontalAlignment(JTextField.LEFT);
    or
    yourTextFieldName.setHorizontalAlignment(JTextField.LEADING);
    hth.

Maybe you are looking for

  • Im not sure if this goes in this section of the forums but oh w

    I got my Zen V yesterday and I love it but theres one problem. 3 of the songs I have on it won't play. It says that the audio format is not supported, But the format is mp3 and it plays every other mp3 song that I have. I Don't know why it's having a

  • How do I replace data on my PC with data from iCloud?

    How do I replace data on my PC with data from iCloud?

  • Multiple Business systems

    Hello, Can Multiple Business systems be associated with one Technical system in SLD and assigned in D ? Regards,

  • (266758030) Q SYNCH-12 Does Workshop work with WebLogic Server 6.1?

    (266758030) Q<SYNCH-12> Does Workshop work with WebLogic Server 6.1? (asked by Noel Fuentes) A<SYNCH-12> (by Adam Fitzgerald): No, Web Services in WebLogic Server 6.1 are different from those available in WebLogic Server 7.0. WebLogic Workshop is a W

  • Denny help

    Receive automatic updates to Windows Vista; Two weeks ago, began having trouble printing individual pages, rather than entire document; Finally, deleted all adobe software and downloaded Adobe Reader.  Now, content of document is garbage. Cannot read