How do I add either a line Feed or Carriage Return to a column?

I am using
"Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production"
"PL/SQL Release 11.2.0.1.0 - Production"
"CORE 11.2.0.1.0 Production"
"TNS for Linux: Version 11.2.0.1.0 - Production"
"NLSRTL Version 11.2.0.1.0 - Production"
I would like to know when merging two results like so:
select
     'Answer: ' || answer_value || 'Date: ' || date || 'Name' || name_value as notes
from table
to show as in the column:
Answer: B
Date: 07-11-2013
Name: Johnny
I get something like this
Answer: B Date: 07-11-2013 Name: Johnny
Is there a way to use Line Feed or Carriage Return?
I tried using the char(10) but did not work.
Also where are the instruction to be able to place the query into a format to allow others to see? Originally I learned to use code { } on this site, but they changed it.
example:
select
'Answer: ' || answer_value || 'Date: ' || date || 'Name' || name_value as notes
Testing it above.
Plus what happened to the preview button to see if I posted it correctly?
The section on" how to ask a question "did not have much about this.

You may be going about this the wrong way.  Such formatting is normally left to the reporting tool.
Embedding formatting junk (like cr/lf) in your data is not a good idea.  Not only does it not belong there, but it might not always work.  CR and/or LF are platform specific.

Similar Messages

  • JeditorPane text selection problem due to line feeds and carriage returns

    Hi folks,
    I have a jEditorPane (text/plain) that contains a document in which the user has highlighted some text. I want to pull the selected text from the pane, do some processing on it, and then put the altered text back in the same position.
    First I get the starting and ending position of the highlighted text
    int mySelStart = myJEditorPane.getSelectionStart();
    int mySelEnd = myJEditorPane.getSelectionEnd();Then I get all the text from the pane and (in theory) strip out the portion the user highlighted
    String myPaneText = myJEditorPane.getText();
    String mySelectedText = myPaneText.substring(mySelStart,mySelEnd);But the text string in mySelectedText never matches what the user originally highlighted. The starting and ending positions are off by the number of carriage returns that proceed the highlighted text in the document. It appears that while in the jEditorPane Java treats the carriage return as one characters, but once the info is in the myPaneText field Java treats the carriage return as two characters.
    Has anyone encountered this before? Am I doing something wrong? To fix the problem I'm looping through the entire document to find out how many carriage returns proceed the highlighted text, but there has to be an easier way.
    Thanks

    It appears that while in the jEditorPane Java treats the carriage return as one
    characters, but once the info is in the myPaneText field Java treats the carriage
    return as two characters.Correct on a Windows platform. Check out my posting here for a one line solution:
    http://forum.java.sun.com/thread.jspa?forumID=31&messageID=1464594

  • Trying to capture line feed or carriage return

    We have a socket application. We would like to know what is the line terminating character? Below is a snippet of codes. Any comments if this is right?
    BufferedReader readerBuffer = null;
    readerBuffer = new BufferedReader(new InputStreamReader(sockConn1.getInputStream()));
    int readChar=0;        
    while ((readChar=readerBuffer.read()) != -1)
         System.out.println("Read char "+(char) nextChar); 
    }

    Below is the full codes without the db connection and processing as we see that will be too long here.
    public class deviceServer {
      class deviceConnectionHandler implements Runnable {
        private Socket sockConn1;
        deviceConnectionHandler(Socket receivedSocketConn1) {
          this.sockConn1=receivedSocketConn1;
         Connection dbConnection = null;
         Statement dbStmt = null;
         public void run() {
         String completeMessage="";
         BufferedReader readerBuffer = null;    
        BufferedWriter writeBuffer = null;
         try {
             readerBuffer = new BufferedReader(new InputStreamReader(sockConn1.getInputStream()));
             writeBuffer = new BufferedWriter(new OutputStreamWriter(sockConn1.getOutputStream()));
             int readChar=0;        
             sockConn1.setSoTimeout(120000);
           //dbConnection = connectionPool.getConnection();
             //dbConnection.setAutoCommit(false);
                 while ((readChar=readerBuffer.read()) != -1)
                           System.out.println("Read Char : "+(char) readChar);
                           completeMessage += (char) readChar; 
                         if (readChar == '*') {
                         try {
                          writeBuffer.write("@@\r\n\r\n");
                         writeBuffer.flush();                    
                          //db processing
                           dbConnection.commit();
                        catch (SQLException ex){
                             ex.printStackTrace();
                                try{   
                                    dbConnection.rollback(); 
                                    catch (Exception rollback){   
                                         rollback.printStackTrace();
                         catch (Exception e){
                               e.printStackTrace(System.out);
                                   try{   
                                    dbConnection.rollback(); 
                                    catch (Exception rollback){   
                                         rollback.printStackTrace(System.out);
                         finally{
                                try{
                                     if ( dbStmt != null ){
                                       dbStmt.close();
                                catch(SQLException ex){
                                ex.printStackTrace(System.out);
                       completeMessage="";          
               catch (SocketTimeoutException ex){
                    ex.printStackTrace();
               catch (IOException ex){
                    ex.printStackTrace();
               catch (Exception ex){
                    ex.printStackTrace();
               finally{
                 try{
                      if ( dbConnection != null ){
                        dbConnection.close();
                 catch(SQLException ex){
                     ex.printStackTrace();
                 try{
                     if ( writeBuffer != null ){
                             writeBuffer.close();
                 catch(IOException ex){
                    ex.printStackTrace(System.out);
       public static void main(String[] args) {
          new deviceServer();
       deviceServer() {
          /*try {
          // setup the connection pool
          catch (SQLException e) {
             e.printStackTrace(System.out);
          try{
                final ServerSocket serverSocketConn = new ServerSocket(7000);                    
                while (true){
                   try{
                       Socket socketConn1 = serverSocketConn.accept();
                     new Thread(new deviceConnectionHandler(socketConn1)).start();                          
                   catch(Exception e){
                      e.printStackTrace();
          catch (Exception e){
             e.printStackTrace();
    }

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • How can I add a red line below all those words, which are not technically correct? And how can I do Pages to do it automatically?

    So, how can I add the red line below all those words, which are not technically correct.
    I have tried everything, but nothing works. Red line should come there automatically, but I can't find nothing from settings to do this. Can you guys help me?

    There isn't any finnish spellcheck in Pages
    Inspector palette = Asetukset
    I am trying to find out where to get a finnish dictionary that can work in Pages. I am not sure but try this
    http://www.jkwchui.com/2010/03/spellchecking-latex-in-macosx/

  • How can I add the cc line to my emails from iphoto

    I want to use the email in my iphoto program to email an invitation to a large group of people, but how do I add the cc line in my header of the email?

    You can't.  For a cc or bcc field you will have to use the regular Mail client.  However, Mail does have some photo stationary if you like the fancy iPhoto presentation of photos in the emails:
    Click to view full size
    OT

  • Using `n how can i add two empty line (two carriage return), between these two lines in the output file?

    hi friends
    using `n   how can i add two empty line (two carriage return), between these two lines in the output file?
    PS C:\> $env:COMPUTERNAME | add-content c:\file.txt
    PS C:\> $Env:USERDOMAIN  | add-content c:\file.txt
     i tested "$env:computername`n`n`n$env:userdomain" | add-content c:\file.txt   but it results in 
    myPCMyDomain
    but i wanted the contents of the output file be like this:
    MyPC
    #empty line here 
    #empty line here
    MyDomain
     i tested many other forms but didn't work.
    thanks

    I tried it, as well. The line breaks were respected in the PowerShell console, Programmer's Notepad, and Word; they weren't in Notepad.
    You are using a Unicode file.  Locale is what?
    If you just want notepad compatible line breaks then do this:
    del file.txt ; "$env:computername`r`n`r`n`r`n$env:userdomain" | add-content file.txt ;notepad file.txt
    Look in hex to see that `n is ^L or 0xA and is only one character.  CrLf is 0xD 0xA - two characters.
    My programmers editors and VS all understand a single ^L as a line break so does PowerShell.  Only DOS/Notepad and other utilitis don't understand this..
    ¯\_(ツ)_/¯

  • How do I add a second line at home?

    I've been trying to find the answer to this question online and have struck out. Verizon's website says that to add a second line at home you can log into your account, go to "My Profile," click on "Lines & Accounts," and then click on "Add Second Line" (or something like that....unfortunately today Verizon's online support system is claiming that online support is not offered in Virginia). When I go to "Lines & Accounts," however, it does not give me the option to add a line—it will only allow me either to de-register my current phone number from online account access or to register another billing number for online access.
    At the moment I am not certain I actually want to order the second line—I just want to price it out to determine whether I would rather get a second line or switch to VOIP service with dry loop DSL. This is why I'd rather run through my options online instead of having to call customer service—it's easier and more efficient to be able to view the options on the screen instead of having to take notes while talking to someone.
    Does anyone know if there is a way to price this out online? Verizon's site has been the target of much profanity from me due to the apparent absence of this feature and due to this utterly ASININE statement that appears when I try to get online support: "Select a Service for Online Help/Verizon does not offer this service in Virginia. You can search or browse Phone Support for the services." I mean, come on, is that some sort of joke??!!
    (I use a Bang & Olufsen two-line cordless phone system tied to a BeoLine base unit, and I've already confirmed that the phone jack into which the BeoLine is plugged is indeed wired for two lines. So that's not an issue.) 
    Message Edited by 1995hoo on 07-29-2009 09:47 AM

    Hello, 
    I've already seen your post on StachExchange and answered you there. So here's the answer: 
    All you need to do is to add solid to the border-bottom property, so it would look like this:
    .groupheader {
    padding-left: 10px !important;
    padding-right: 5px !important;
    border-bottom: 1px #000000 solid ;
    Mohamed Derhalli
    SharePoint Consultant
    Blog: SharePoint Thoughts
       Twitter:
    LinkedIn:
      

  • How do I add a new line to an already open but exhausted PO?

    Hello,
    I am looking for way(s) I can add a new line to an already open  PO, (whose funds are exhausted) to accomodate unplanned expenses related to the same project/vendor.  Is adding a new line to the original purshase requisition the right way to go?
    Thank you
    Fatima
    Edited by: Fatima Imraan on Jul 4, 2008 8:05 PM

    Hi Fatima,
    For unplanned expenses we actually do not need additional line item.
    In case the invoice from vendor shows other expenses then in MIRO there is a TAB for Unplanned Expenses and we can put such expenses there. These expenses should be with in the tolerances limits set. Now if the expenses cross the limit, depending on the settings you have made, the invoice is posted but blocked for payment. Then some one in the approval list should approve the same and the payment can be made.
    This whole process also gets recorded as PO history and hence is very well documented as well
    Normally once a PO is signed it is binding on both parties. So as a Business Process we should not try to add a line item when the PO is exsausted.
    In such case i think it would be a good idea to either create a new PO.
    Some times companies aslo use OPEN PO if it is a year round activity.
    Hope my explanation is useful. assign points if yes.
    Thanks
    Anand

  • [Forum FAQ] How do I add an average line to series group on SQL Server Reporting Services column chart?

    Introduction
    In SQL Server Reporting Service (SSRS), you may need an average value on column chart.
    For the above chart, add an average score line to the chart, you can get which student’s score is larger than average score, and which student’s score is less than average score clearly. This document demonstrates how to add an average line to series groups
    on SSRS column chart.
    Solution
    To achieve this requirement, you can add another values to the chart, change the chart type to line chart. Set the value to average value of the series group and set the line to show only once by using expression. Please refer to the link below to see the
    detail steps.
    Click the chart to display the Chart Data pane.
    Add Score field to the Values area.
    Right-click the new inserted Score1 and select Change Chart Type. And then change chart type to line chart in the Select Chart Type window.
    Change the Category Group name to Subject. Here are the screenshot for you reference.
    Right-click the new inserted Score1 and select Series Properties.
    Click the expression button on the right of Value field textbox, type the expression below:
    =Avg(Fields!Score.Value,"Subject"))
    Click Visibility in the left pane, select “Show or hide based on an expression”, and type in the expression below:
    =IIF(Fields!Name.Value="Rancy",FALSE,TRUE)
    Name in the expression is one of the Students. Then only one line chart is be displayed by using this expression.
    Click Legend in the left pane, type Average_Score to the Custom legend text box.
    The report looks like below:
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How can I add a third line of text to a title?

    I am making a music video for my highschool students to teach about recycling and I want to add a title to the bottom with the song title, the name of the ficticious band and the ficticious record label.
    I have tried to add the third line of text, but I can't seem to figure out how. the title needs to be superimposed on the actual video, so adding in a clip created in photoshop or something won't work. Think about the titles you'd see at the begginning and end of a music video, and that's pretty much what I am going for.
    Any suggestions?
    Thanks
    PS this is my first post and my first mac, so be gentle

    Bubbalouie123754 wrote:
    ....  the title needs to be superimposed on the actual video, so adding in a clip created in photoshop or something won't work. ....
    It does.
    The whole trick is to use a transparent background and using .png as file-format for your superimposed graphics:
    illustrated advice on my site
    https://sites.google.com/site/karstenschluter/imovie09tricks
    'Creating new titles'
    (advice was for vers09, does work in vers11)
    … and Welcome, Bubbalouie, to the ASC ...

  • How to force print  page breaks (line feeds) in printed documents

    setup:
    Illustrator CS4
    Windows 7
    I've created a longish document of various pieces of text in 2 diffeent fonts.  No graphics.
    Can I insert linefeeds into the document where I want page breaks when it is printed? If so, what is the technique.
    I come from linux/unix background where one can insert a Ctrl+L (line feed) to cause the printer to start a new page
    at that point.
    I got many hits on a search of this forum on `line feed' but those I browsed didn't really get to the question I'm asking.
    Its a little confusing too because it appears from some of the hits that a line feed is different on windows and even does
    something different.
    Or if that isn't the right approach, how can I make the long document print out in some sensible way?
    I'm using a common inkjet printer (epson R800)

    Can I insert linefeeds into the documentwhere I want page breaks when it is printed? If so, what is the technique.
    This is why I mentioned art boards. A new line or line feed is created when you hit the enter or return key. (I mention both keys as i do not know whether you have a mac or PC though I am leaning to pc since you mention linux/unix.
    You should find the folowing link will tell you everything you need to know about artboards.
    http://help.adobe.com/en_US/Illustrator/14.0/WS0939CFEE-49EF-4c6f-B337-8897EC89DF89.html

  • How do I add new single line in a WAD input layout?

    Hello ervery one
    I had create a WAD ,and insert a input read query ,but I don't how to add a new line for this input read query on WAD
    can every one help me
    thanks very much
    regards
    wenlong

    thanks for you reply Hymavathi Yanamadala
    It is very usefull help me
    but I think there have aonther requment whether there is number  of new line can be set through a veriable that user write into,
    that it is like use it is in Analyzer's workbook
    thanks very much
    regards
    wenlong

  • How do I add space between lines of text in the same cell on Numbers 3.0.1

    I just updated to Mavericks 10.9. In numbers, I used to be able to uncheck a box in the inspector that would make it so the Return key did not move to the next cell, but instead allowed me to add more space between lines of text in the same cell.
    How can I do this in the new version of numbers?

    HI ilb,
    Numbers 3 is a complete rewrite of the application. This preference option hasn't (yet) been included, but N3 is very much a 'work in progress. A word to Apple via Provide Numbers Feedback asking to have this option included in Numbers 3 might be a useful step. You'll find Provide Numbers Feedback in the Numbers menu in Numbers.
    Regards,
    Barry

  • How do I add effects to lines?

    I have a map of Manhattan that has been boiled down to just vector lines of the roads. I'm trying to add effects to the lines to kind of stylize the map.  I'm trying to create effects similar to the this example that I found online.  The photo below was probably NOT created in Illustrator.

    If you are trying to get create the colored blurry brushstrokes, suggest you create that in phothsop.
    Though only way to create this in Ilustrator wouinvolves using bitmapped effects (motion blur, watercolor), but your file would very slow in the end.
    I would copy and paste your vector lines as a smart object into photoshop. In Photshop make paint in the color part (mixer brush may be good for this). Turn visibility off for your smart object layer, and place this into Illusutrator, set your black lines in Illustrator to overprint or multiply.
    Might also look good if you bitmap the black lines in Photshop, for a more unform look to the softness of the illustration.

Maybe you are looking for