Sqlplus recognize any type of DBMS_OUTPUT newline character?

I am creating a complex chain inside a procedure and the display with dbms_output.put_line. It works fine with SQL Developer, but when I use it in SQL Plus it comes out goofy. It was narrowed down to me using Chr (10) where I want the line breaks. Is it possible to display a 'formatted' in SQL varchar2, as I expect them? I've even tried using .put with no luck.

With the help of:
Oracle 10.2.0.4.0
SQL Plus 10.2.0.1 / 9.2.something

Here is a little example:
set serverout on
set linesize 10
 
declare
  lv_string varchar2(32767);
begin
  for x in 1..5
  loop
    lv_string := lv_string || 'I AM LINE ' || to_char(x) || chr(10);
  end loop;
  dbms_output.put_line(lv_string);
end;
/ 
 
Expected Output (What I'm getting in SQL Developer):
 
I AM LINE 1
I AM LINE 2
I AM LINE 3
I AM LINE 4
I AM LINE 5
 
Actual Output (SQL Plus):
 
I AM LINE
1
I AM
LINE 2
I
AM LINE
3
I AM
LINE 4
I
AM LINE 5
Right now I use a work around, but want to use a character (or a combination of characters) that SQL more will play with beautiful... If there is.
declare
  lv_string     varchar2(32767);
  lv_start      pls_integer;
  lv_end        pls_integer := 0;
  c_newl        constant varchar2(1) := chr(10);
begin
  for x in 1..200
  loop
    lv_string := lv_string || 'I AM LINE ' || to_char(x) || c_newl;
  end loop;
  loop
    lv_start := lv_end + 1;
    lv_end := instr(lv_string, c_newl, lv_start);
    exit when lv_end <= lv_start;
    dbms_output.put_line(substr(lv_string, lv_start, lv_end- lv_start)); 
  end loop;
end;
/ 
 

Hello

Try increasing your linesize:

set linesize 180

Tags: Database

Similar Questions

  • Equium A60-199 is not play or recognize any type of cd or dvd

    Hi all

    It's the first time I was in the unfortunate duty position post one problem-normally I can find a solution here and just fix it myself!
    I have an a60-199 on windows XP Home Edition. It is about 18 months and unfortunately out of warranty. The issue I'm having is that the cd rom drive (a carpet * s uj-830) is not play or recognize any type of cd or dvd. Finally, I used about a week ago and have tried resetting the system to forward, then nothing works.

    I also tried the suggestion of microsoft to change IDE transfer parameters, and that no longer works. When I put a disk in it turns three times and the light on the cd drive flashes, but he can't find anything, and I get the message ' d: / is not accessible. the request could not be performed because of an i/o error "I also websearched that but found nothing else than the suggestions above that has not worked."

    Is it possible that the link between the motherboard and cd rom to be broken yet light and spinning cd happen? I am completely confused and would like to have suggestions from anyone!

    Thanks in advance,
    Fyldelass.

    Hello

    Don't reset the system how you used recovery media to set to factory settings? If so, I think that there must be a hardware malfunction. The drive has power and I think that the problem is not connection but damaged drive.

    The drive is original and also compatible with this unit. The assignment of pins is just. Before trying anything, you can try to remove the disc and check the contacts. Maybe they should be cleaned. If nothing helps, I presume that the replacement should be performed.

  • DVD/cd/rom won't recognize any kind of disc vista home prem 64

    CD rom just stopped working? When I run the test it does not recognize any type of cd or dvd? Help!

    Hello

    Step 1: Please do all the same underneath if you did some before as is often total
    a process that solves the problem.

    Try this - Panel - Device Manager - CD/DVD - double click on the device - driver tab.
    Click on update drivers (this will probably do nothing) - RIGHT click ON the drive - uninstall.
    RESTART this will refresh the default driver stack. Even if the reader does not appear to continue
    below.

    Then, work your way through these - don't forget the drive might be bad, could be a coward
    cable or slight corrosion on the contacts (usually for a laptop) and other issues.

    Your CD or DVD drive is missing or is not recognized by Windows or other programs
    http://support.microsoft.com/kb/314060 - a Mr Fixit

    Try this fix manually if the Fixit 314060 does not work
    http://www.pchell.com/hardware/cd_drive_error_code_39.shtml

    Your CD or DVD drive is missing or is not recognized by Windows or other programs-
    a Mr Fixit
    http://support.Microsoft.com/kb/982116

    The CD drive or the DVD drive does not work as expected on a computer that you upgraded to
    for Windows Vista
    http://support.Microsoft.com/kb/929461

    When you insert a CD or a DVD, Windows Vista may not recognize the disc
    http://support.Microsoft.com/kb/939052

    Your CD or DVD drive cannot read or write media - A Mr Fixit
    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    CD/DVD drive does not appear in Windows Vista, or you receive this error in Windows
    Vista installation after booting from the DVD (AHCI)
    http://support.Microsoft.com/kb/952951
    Drive CD - R or CD - RW Drive is not recognized as a recordable device
    http://support.Microsoft.com/kb/316529/

    Hardware devices not detected or not working - A Mr Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    Another possibility is that the cables are loose. Remove ALL power, then make sure that the cables in both
    ends. Remove and replace, do not just tight. For laptops, you can often clean power and
    contacts data with a pencil eraser.

    Some DVD players do not use the Windows default drivers so check with the manufacturer of system and
    manufacturer of device to see if there is a firmware or drivers for your drive if necessary.

    ===============================

    Step 2: You have disc problems as the CD/DVD is actually 4 discs in 1 case (CD & DVD
    Burn and CD and DVD read). So it is not unusual for 1 or 2 operational so that other parts
    do it right.

    Did you follow the Troubleshooting Guide for the reader who still does not work? There are
    the entries in registry that the troubleshooter does not solve and those who "might" be the cause.

    Check with your Maker system and a device for the two possible firmware updates and
    the correct registry entries for your car.

    Here are the keys that I of course are those in question - for the subkeys of the CD/DVD drive
    as there will be other subkeys in these keys. Do not forget to ask specific keys involved as well as
    the parameters.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ {4D36E965-E325-11CE-BFC1-08002BE10318}

    -----------------------------------------------------------------------

    You can probably find more info here and maybe even the exact registry for your CD/DVD settings
    drive from someone with the same model.

    Forums - a lot of expert real help
    http://Club.myce.com/

    CD/DVD units
    http://www.myce.com/storage/

    Use DevManView to locate the CD/DVD in the registry (be careful and do a prior Restore Point)
    nothing change) - find the DevManView device and then make a right click on it free in RegEdit.

    DevManView - free - an alternative to the standard Windows Device Manager, which displays all the
    devices and their properties in flat table, instead of the tree viewer
    http://www.NirSoft.NET/utils/device_manager_view.html

    I hope this helps.

  • Lightroom does not recognize any of my file types [DNG / JPEG etc] and is unable to import? any ideas for a fix?

    Lightroom does not recognize any of my file types [DNG / JPEG etc] and is unable to import? any ideas for a fix?

    It's impossible. LR is a non-destructive editor and photo management. For her to not see images of the files would make it one of the worst of these programs tyupes.

    So there is a parameter that you have screwed up in the import dialog window that prevents your DNG, TIFF, JPG, PSD, PNG, CMYK and film formats appear in the import window.

    So show us a screenshot of your import window.

    More than likely you have chosen a destination that has all the permissions read/write to your username.

  • After the new installed hard drive, DVD player, not to recognize any media

    given that I had a new hard drive installed my dvd will not play any type of media, or play any DVD including those that I burned to a disc, since the new drive has been installed. I tried to download the drivers and utilities, I got with my comp. but like I said it will not read. I even tried to download dell canada drives, but still no help. also, my webcam does not work as well and again tried to download from disk but no luck.

    Hello

    ·         What happens when you insert the CD into the CD/DVD drive?

    ·         Do you have an error message when you try to play the CD?

    I suggest you try to fix this problem automatically by clicking on Fix It in the steps below:

    Step 1:

    The CD drive or the DVD drive does not work as expected on a computer that you upgraded to Windows Vista
    http://support.Microsoft.com/kb/929461

    Step 2:

    When you insert a CD or a DVD, Windows Vista may not recognize the disc
    http://support.Microsoft.com/kb/939052

    Step 3:
    Your CD or DVD drive cannot read or write media - Fixit

    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    If the issue still exists post returns with the information requested in questions.

  • Windows 7 does not recognize any keyboard, except the v1.0 of MS natural ergonomic Keyboard 4000 defective

    I have a very strange problem.

    I have a desktop computer Windows 7 64-bit edition, all of a sudden about a third of the keys on my Microsoft Keyboard stops working.

    So, I bought a new generic keyboard.

    The problem

    1. If I plug the natural ergonomics MS Keyboard 4000 v1.0-it recognizes the keyboard, BUT it does not recognize one of the buttons on the left and right of the keyboard.

    2. If I plug any USB keyboard or a Bluetooth keyboard on it - it does not recognize.

    However, the Bureau will recognize any wired (USB) or mouse wireless (bluetooth) connected.

    It baffles me that the bureau will recognize a usb or bluetooth mouse mouse - but that it will not recognize the bluetooth keyboard or a usb keyboard.

    I tried many things

    1. connect the USB and Bluetooth keyboards in my laptop and check that they work properly. -They are.

    2. I tried using different USB ports on the desktop. He has not made a difference.

    3. my computer allows you to access its bios using F8 - I checked that my material was grateful the Generic USB keyboard before loading Windows. (I could select F8 and bring up the desktop in mode of Bios Configuration).

    4. I tried to start Windows in safe mode. That did not help at all.

    Any help would be greatly appreciated.

    Hello Pauliw,

    Please provide detailed information about your question. I appreciate the step by step troubleshooting, and pain that you have taken to resolve your problem. However, there are a few steps more that we can try to diagnose the root cause in order to solve the problem permanently.

    You can try the steps in the following Microsoft article and see if it works for you.

    Troubleshoot keyboard

    Note: There is place for Windows 7 also.

    Troubleshoot the incidents of the response to the mouse or wireless keyboard

    If the problem persists, try to remove all of the ghosts of your computer devices and then try to use the device. You can see the steps below.

    1. Click Start

    2. In the Search box, type command prompt .

    3. In the list right click on command prompt and select run as administrator.

    4. At a command prompt, type the following command and press ENTER:
      Set devmgr_show_nonpresent_devices = 1

    5. IN the following line from the command prompt, type the following command and press ENTER:
      Start devmgmt.msc.

    6. When the Device Manager opens, click on view

    7. Now, click Show hidden devices.

    8. Remove all the entries that exist for the keyboard and the USB category.

    9. Close Device Manager , and then restart your computer.

    Hope it would help. If problem persists always post back with the current state of your computer and the result of the proposed suggestion, we will be happy to help you.

    Thank you.

  • C# examples fail with "Failed to recognize the type of server or the version when connecting to the host"

    I am currently submitting work for P2V conversion from a c# application. I tried to run the application remotely and on-site, but I get this error message (here is the full error):

    "< detail > < InvalidArgumentFault xmlns =" urn: Converter ' xsi: type = "vim25:InvalidArgument" xmlns:vim25 = "urn: vim25" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" > < vim25:faultCause > < vim25:fault xsi: type = "ConverterNotSupportedConnection" > < hostName > RSMITH < / hostName > < / vim25:fault > < vim25:localizedMessage > impossible to recognize the type of server or the version when connecting to the host "RSMITH". " < / vim25: localizedMessage > < / vim25:faultCause > < / InvalidArgumentFault > < / details >

    RSMITH is the name of the machine with the VCenter Converter Standalone (5.0) and where I wan the VM to go. It's a Windows 7 SP1. I'm under .net 4.0 winform.

    Any suggestions? I'm pretty much run the sample out of the box, except for wrapping a winform around it instead of an application console.

    Cannot you telnet from your Converter machine on the source IDE oucederomsurlesecondport 9089 machine?

  • Satellite A500-141 - the CD/DVD drive will not recognize any disk in the status bar

    I watch the DVD yesterday and he played upward halfway through and almost jerky. Ejected and thought no more of him now, the player will not recognize any disc, be it video or sound. I tried a system restore but still the same thing that it is not read disks. Any help appreciated.

    Thanks in advance.

    Hi quietly,

    If your CD/DVD drive doesn't work, how do you have a system restore?

    Is the CD/DVD drive listed in Device Manager correctly or you see a yellow exclamation mark on it?

    Maybe the lens is dirty and must be cleaned with a Microfiber cloth. Open try CD/DVD and try to clean the lens with a clean Microfiber cloth.
    Check this box!

  • Satellite M40X-116 - drive does not recognize any CD or DVD

    Hi all!

    I have a big problem with my SATELLITE M40X-116; I was watching a movie when the image was just stopped and since my CD/DVD RAM drive does not recognize any CD or DVD. What can I do?
    Please I need your help as soon as POSSIBLE.
    If you know what could be the problem, please, just send an e-mail to [email protected]
    Thank you all for the cooperation
    Best regards
    Marian - Romania

    Hello

    to me, this looks like a hardware problem. It must be checked by the service, and perhaps that the drive must be replaced.

    Good bye

  • My superdrive drive don't bed not any type of disc, once I insert it in the drive

    Hi all

    My end 2011 edition iMac doesn't read any type of disc if I insert it in the drive. It automatically rejects the disk after one a wile and then the disc pushes. It allows me not even read the disc. What could be the problem?

    Thank you

    The drive could be faulty, but maybe it's nothing more that a lens is dirty. Lens cleaning products are inexpensive and should give it a shot.

  • Tecra M1 will not read any type of SD card

    Help!
    According to the title, my M1 will not read any type of SD card. I'm running the SP2 of XP reloaded from original floppies, and it is fully up-to-date with Windows Update.
    The little green light adjacent to the slot flashes briefly on the insertion of a card, but nothing happening for example no open option window and nothing visible in my computer.

    I downloaded the latest drivers and installed according to the directives of the readme.txt file and even thought to copy the SDDEVMGR.dll in the System32 folder.
    I obviously lack something, so any help or pointers are welcome.

    Thank you very much. Craig

    Hello

    Usually, books are not all sizes of SD card and so you should be sure that the used SD card is supported and compatible with the Tecra M1 card reader.

    But if you are using a compatible SD card the laptop should be able to read/write on the SD card.
    I try to remove the SD card in the Device Manager controller and remove the driver software malfunction. Restart the computer and install the latest drivers again.

    PS: A registry cleaning would be desirable. CCleaner is a great registry cleaning applications

  • Dynadock - USB Port Replicator does not recognize any USB keyboard

    Hi can any body help?

    I have a Satalite pro L300-154 with a Dynadock - Replicator to USB Port, but it will not recognize any usb keyboard.

    Have you checked if the laptop would recognize the external USB keyboard connected directly to the computer laptop s USB port?

    Please check this!

  • Satellite A20 - CD/DVD doesn't read any type of disc

    I just got a used Satellite A20. Former owner uninstalled programs, and now the CD/DVD doesn't read any type of disc. It has worked well for the former owner.

    Satellite A20C - 0231Q Windows XP - Home drive SD-R2412

    In the bios a cd-rom drive is listed
    In Control Panel, the drive is listed, but with a yellow triangle and a message indicating that the device cannot be used... driver problem?

    Is there a way to locate the driver for an older machine, install it, without making a complete recovery (as the cd player does not work?)? I noticed that the driver Announces began with the Satellite A - 200.

    Any suggestions will be appreciated!
    Thank you!

    Boarder's right. If the drive is listed in the device with the yellow exclamation point manager and the drive is not listed in Windows Explorer, you can resolve following the method described in the document of Microsoft.
    After reboot everything should be ok again.

  • Tecra A9 recognizes any usb device

    Tecra A9 - PTS52E

    I need help/information. USB cannot recognize any device, i, e... Flash / sticks of memory, floppy drive, external cd/dvd or hard drive. previously works very well and suddenly stops and research pilot.

    TIA

    Hello

    Have you noticed yellow exclamation marks in Device Manager next to USB host controllers?
    Check it!

    Even if the yellow exclamation points are not visible in the Device Manager I recommend to remove the USB host controllers and root device manager USB hubs and restart the laptop again.
    Wait that all USB controllers will be recognized by Windows and retest your external USB devices.

    Good bye

  • HP Envy 15 - q47002 i7: laptop overheating, does not recognize any USB. Even in the Bios.

    Hello

    I bought this product last year, so my warranty wore off.

    My laptop is overheating and it is very slow at this point (even videos are not working well). I tried to clean it up but it was without result.  I want the game and computationally intensive applications, but I'm afraid of the motherboard or hard drive failure.

    Now to the point. I can't install the new OS, any OS because this laptop doesn't have a DVD player and it doesn't recognize any usb 2.0 or 3.0.  I tried to change the options in the Bios and I tried to uninstall and install the drivers (they are up to date).

    What should I do? I can't install a new system because of this problem, and I can't use anything more demanding than youtube which is really annoying since this laptop has good specifications.

    I am currently running Windows 8.1 which I got when I made a purchase.

    I hope someone answers!

    Thank you.

    EDIT: In the Device Manager it says device not installed with yellow exclamation point. By Usb or ext hdd. And it will not find the device-specific drivers. As I never need them on another PC or laptop.

    Hi @HarunC,

    Thank you for visiting the HP Forums! A place where you can find solutions for your problems with the help of the community!

    I stumbled upon your post on the laptop and wanted to help you! I looked in your question about your HP ENVY 15 t-4710HQ i7 Quad Core Notebook and questions with serveral fuctions works do not. I recommend to restore the default BIOS settings. You could restore the BIOS with this document by selecting the reload the default BIOS settings. In this way, it will look at the hardware installed on your laptop.

    With the USB not recognized by Windows.  Here is a link to solve the USB connections.

    I would like to uninstall everything cited first in the list of universal serial bus controllers.

    Please note remove any and all USB devices and remove the memory card in the slot of the card reader. Disconnect all non-essential devices before you uninstall the controller Universal serial bus.

    Restart your computer, and then insert the USB device.

    You can try to use the Windows Update Troubleshooter to fix updates that do not come through Windows.  Please restart the laptop twice to make sure that all updates are completed!

    Here is a link if you need to download drivers USB Intel for Windows. This is a utility to update.

    Please let me know how it goes.

    You can say thanks for trying to help by clicking on the Thumbs Up below! .

    Thank you.

Maybe you are looking for

  • The sensor keys touch no longer works on Equium P300

    Hi all my touch sensitive multimedia keys have stopped working, they no longer light up, or work at all, could someone help me.My laptop is still under warranty, I have their ring or is it a short solution?

  • Apple software

    Why do I have the Apple software on my HP laptop and I can delete it without harming anything?

  • license for use of the bridge

    Hello Versions: LabView 2011 SP1, Veristand 2011 SP1 We have a Veristand application consisting of the part in real time running on a target of RT and the MMI running on an ordinary PC part. MMI was fully developed (to our development system) in LabV

  • ChnList box filter search

    Hello I have 1000 channels, and try to create a search filter to the ChnList box in my dialog box - is this possible? Thank you

  • How to open the labview with function of Labview program to stop smoking inside?

    Hi any idea how to open the labview with the Labview function program to stop smoking inside? I forgot to add and define the condition of the type for this program. If the program is an application, she closed immediately. If it is still the work of