preserve the spaces between channels...

Hello world

I'm trying to extract some data in a flat file in a format that each column has start and end positions.
I am trying to trim "spaces" after each column for my requirement. My code is not preserve the
spaces between each string.

That's what I have...



But the strange thing, I found... I run the following code
declare
final_str varchar2(100);
begin
final_str := rpad('12',4)||rpad('12',4);
insert into test(col1) values (final_str);
end;
and that is the preservation of spaces.


Is there something wrong with my code. I need to preserve spaces after each series.
Please help me solve this problem...

Thank you

Hello

I did this test and works great:

DECLARE

    v_line      VARCHAR2(1000);
    FILEHANDLER UTL_FILE.FILE_TYPE;

BEGIN
    FILEHANDLER := UTL_FILE.FOPEN('EXT_FILES', 'test.txt', 'W', 10000);

    v_line := RPAD('hello', 30) || RPAD('how', 30) || RPAD('are you?', 30);

    UTL_FILE.PUT_LINE(FILEHANDLER, v_line, TRUE);

    UTL_FILE.FCLOSE(FILEHANDLER);

EXCEPTION
    WHEN OTHERS THEN
        raise_application_error(-20001, 'An error was encountered - ' || SQLCODE || ' -ERROR- ' || SQLERRM);
END;
/

Generated file:

hello                         how                           are you? 

Kind regards

Tags: Database

Similar Questions

  • Maintaining the space between elements in the xslt file

    Running on 11 GR 1 material...

    Try running an xslt to output html... transformation and the transformation deletes the space between my 2 items... (the space between John and Smith is removed)
    SELECT XMLSERIALIZE (
              CONTENT XMLTRANSFORM (
                         xmltype (
                            '<data><column name = "USER_FNAME">John</column><column name = "USER_LNAME">Smith</column></data>'),
                         xmltype (
                            '<?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <body>
    <p>
    Hello <xsl:value-of select="/data/column[@name=''USER_FNAME'']"/> <xsl:value-of select="/data/column[@name=''USER_LNAME'']"/></p>
    </body></html>
    </xsl:template>
    </xsl:stylesheet>')) AS CLOB)
      FROM DUAL;
    Outputs:
    <html><body><p>
    Hello JohnSmith</p></body></html>
    What I've read, this is the standard behavior... the only thing I could do to get this working was to add an xsl: Text with XML: Space = "preserve".
    SELECT XMLSERIALIZE (
              CONTENT XMLTRANSFORM (
                         xmltype (
                            '<data><column name = "USER_FNAME">John</column><column name = "USER_LNAME">Smith</column></data>'),
                         xmltype (
                            '<?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <body>
    <p>
    Hello <xsl:value-of select="/data/column[@name=''USER_FNAME'']"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="/data/column[@name=''USER_LNAME'']"/></p>
    </body></html>
    </xsl:template>
    </xsl:stylesheet>')) AS CLOB)
      FROM DUAL;
    Part of the problem is I am also generate the xslt of the model user seizures... user enters the code for creating simple templates, I run it through various regexes to generate an XSLT that... before you run the XSLT on xml data.

    Example:
    <p>Hello {{USER_FNAME}} {{USER_LNAME}}</p>
    This snippet is entered by a user and transformed in the xslt above... It seems to have to replace all the white spaces with xsl elements: Text empty a little problematic... I was wondering if there is a more elegant solution?

    Thanks for the help and advice!

    Hi Jason,

    From what I understand, the problem is not about properly return a space in a document of XSLT (there are several way to do in fact), but rather on the creation of the XSL piece out of the model defined by the user.
    OP use a search and replace on tags custom in the model, so there maybe is complicated on the mixed complex content.

  • How to change the space between folder icon and the text on the personal toolbar?

    I have some files in the personal toolbar with just a letter to indicate what they are, but on the theme that I use, the letter is too far from the record, it belongs to and partially falls under following folder icon. I don't want to increase the space between all the icons to show the full letter, as this decreases the amount of icons that you can have in the toolbar. Instead, I want to reduce the space between the file and the text belonging to him, so he is right next to him instead of 5 pixels away.

    I found various entries to change the padding and margins in userChrome.css, but it's always around the icon, I don't know where to look to close the space between the icon and the corresponding text.

    Any help would be greatly appreciated, thank you.

    Did you check the value of the left margin of the text?

    You can set if necessary negative margin values.

    #PlacesToolbarItems .toolbarbutton-text { margin-left: -2px !important; }

    Add .bookmark-item [container] If this enough for the items in the folder

    #PlacesToolbarItems .bookmark-item[container] .toolbarbutton-text { margin-left: -2px !important; }
  • Piano roll Editor: is it possible to eliminate the spaces between the many notes at once?

    Using the step input method, I entered a number of 1/2 notes in the piano roll Editor.

    Then I selected all my notes and decided to shorten all 1/4 notes after realizing that the pace was too slow.

    The problem is that I now have many empty spaces between the notes of 1/4:

    Is it possible to eliminate all the spaces between the notes at once with all selected notes notes?

    Or I have to manually move each 1/4 at the end of the previous note footnote 1/4.

    I think there must be a quicker way to do this.

    Select all under the Edition of the piano roll Editor menu or command button has

    Then enter the end of a single note and all selected notes will also expand.

  • Windows Server 2012 does not seem to recognize the space between the program and files

    I installed 'R' in D:\Program Files.
    Then I need to install another application that must refer to this path and validate during its installation. Installation of the next application saying that there is a "Invalid Version of R.

    If I install R in the following directories, it is recognized and my next application installed successfully:
    C:\Program Files
    Files S:\Program
    D:\R

    Windows Server is not recognize the R application properly installed in "D:\Program Files." Windows runs into the space between "Program" and "Files" and put an end to the execution of this order.

    The application I am trying to install the message 'Invalid Version of R' returns because he can't run the command check correctly. Because nothing is returned from the R.exe, he is unable to continue. This issue seems to be related to Windows and once R.exe can be run correctly D:\Program files, I would expect demand to continue to install. Is anyway getting D:\Program Files to be recognized as the other 3 directories I mentioned?

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Sony Xperia Tablet S has the space between the screen and back

    Hey,.

    I just discovered that the space between my front and back is! I checked out the site to see if it was one of the tablets known with the question, but it wasn't. Although he did not share the same problem as the Xperia which have been requested to return.

    Here are some pictures:

    http://i350.Photobucket.com/albums/q429/Silasje1/DSC_0082.jpg

    http://i350.Photobucket.com/albums/q429/Silasje1/DSC_0063.jpg

    http://i350.Photobucket.com/albums/q429/Silasje1/DSC_0085.jpg

    Really weird that it can be done!

    I checked here:

    http://www.Sony.nl/support/NL/product/SGPT121GB_S/news/Xperia_S_series_notice2

    But he said that my tablet was not part of the known :/

    I can put my nail enters the length of more than 13 cm


  • How to reduce the space between icons on the desktop?

    I want to reduce the space between icons

    Right-click on the desktop, select "Display", uncheck "auto arrange" and snap to grid "if they are checked, then move the icons in the desired position.
    I hope it works for you.

  • How to fill the space between the four points of the paint method?

    Hello

    I have a graphics application and I want to fill the space between four points by painting method how I can do it.

    can someone help me?

    Try to use Graphics.fillRect which allows to fill using coordinates xy as well as a width and a height.

    If the points are not rectangular, you can try to use Graphics.drawFilledPath.

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#FillRect (int, 20int %, 20int %, 20int %)

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#drawFilledPat... (int [], 20int [], % 20 byte [] % 20int [] %)

  • I have a button with the icon text. Is it possible to increase the space between the text and icon?

    Mr President.

    I have a button with the icon text. Is it possible to increase the space between the text and icon?

    adf button text image space.png

    adf button text image space.jpg

    Concerning

    Have you tried it as directed by the other thread?

    
    

    See you soon

    AJ

  • How to reduce the space between two lines in a panelformlayout who is lain in the panelbox?

    Mr President.

    I have a panelbox in which I put a panelformlayout which have two rows as below

    panelformspace.png

    I want to reduce the space between inputfield first and second inputfield.

    Thus, this second inputfield closer to the first inputfield

    Respect of

    You can define simple = true in the first entry field (name), sorround who on the ground with panelLabelAndMessage and add the second inputField (address) about to end of panelLabelAndMessage.

    In fact, you can add more or less space with spacer between them and panelGroupLayout with horizontal layout as a facet of the end child

  • How to remove the spaces between the textfield in a horizontal layout - ADF Mobile

    snip.png

    Please tell me how to reduce the width of the 1st two textfields whose number of 971 and 50 and increase the width of the textfield "mobile".

    My code is given below

    < amx:panelGroupLayout id = "gp1" layout = "horizontal" >

    < amx:inputText value = "971" hintText = "Country Code" id = "it3" inputType = 'number' simple = "true" inlineStyle = "width: 70% margin-left: 5px" / >

    < amx:inputText value = "50" hintText = "Code" id = 'it8' inputType = 'number' simple = "true" inlineStyle = "width: 70% of margin-left: 5px" / >

    < amx:inputText value = "#{pageFlowScope.mobile_number}" hintText = 'Mobile' id = "it6" inputType = 'number' simple = "true" inlineStyle = "width: 100%" / > "

    < / amx:panelGroupLayout >.

    Width of the 1st two fields should very less that we will get that 2 or 3 numbers. Where are mobile, the width must be more as we enter the 10 numbers.

    This means that for example alignment must be as shown in the picture below. And the space between them must be equal and uniform as shown in the image below.

    pic.png

    Please help me someone

    Try using rowLayout as:

    
          
            
          
          
            
          
          
            
          
    
    
  • URGENT magic wand tool selects a line drawing, instead of the space between

    Hello

    I am coloring/rendering a map of the places where I imported a PDF of line drawing prepared in Autocad. To do this, I usually start with the magic wand tool to select areas on the plan and block everything with the pot of paint color. However, this time when I select objects (say the building) selects the black lines in the layer (the line drawings) rather the space between the two. I checked to see if all the lines are closed and I played with the tolerance but he still picks on the lines instead. I tried both on a transparent background and tried to merge the lines with a layer of white background but without success.

    Please help if you can, I have a tight deadline to finish it and use the polygonal selection on everything that would be both pain and take too much time! I have Adobe Photoshop CC 2015.

    Thank you.

    If there is a problem with gaps - create a copy of the layer. Apply a 1 - 2px Gaussian blur. Use the magic wand on this layer, then make your choice.

    Dave

  • How can I change the color of the spaces between the buttons of menu

    Hello

    I have problems by changing the color of the spaces between the menu buttons.

    The spaces between the color buttons lighter must be the same color as the buttons.

    Please note that some buttons are voluntarily lighter, some are darker.

    Screen Shot 2016-05-31 at 16.46.17.png

    Help would be greatly appreciated.

    Thank you.

    Dmitry

    Select the Menu container. Open the control panel of the spacing. The horizontal gutter value 0.

    You can always add padding for menu items to create extra space.

    David

    Creative muse

  • How to reduce the space between the section number and title of section in TOC

    Hello

    I want to reduce the space between the section number and title of section in TOC.

    can someone guide me on how to do this:

    4.PNG

    Thank you

    Try to do it from the style of paragraph (bullets and numbering) options

  • Can't the space between words

    When monitoring and sending a pdf file, cant the space between words

    Hi all

    Today we released a hotfix that resolves this problem on space/line jump does not work in the transmission and the railway. If you're not already updated to the latest patch, simply open Acrobat and visit help > check for updates to apply this hotfix.

    More details about this release and bug fixes is available here: https://helpx.adobe.com/acrobat/release-note/acrobat-dc-june-02-2016.html

    Please give it a try and let us know.

    Thank you

    -ashu

Maybe you are looking for