replace the carriage return, displaying the output on a single line

[oracle@ccoshs02xvdbs01 ~] $ sqlplus deploy_ctl/deploy_ctl

SQL * more: Production version 11.2.0.1.0 on Mon Mar 28 10:21:05 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options


Modified session.

10:21:05 SQL > insert into test (b) values ("this is stop
10:21:38 2 space are now ');

1 line of creation.

10:21:47 SQL > commit;

Validation complete.

10:21:49 SQL > select test b where b as "this % ';

B
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
It is stop
space wear now


10:22:07 SQL > select replace (b, chr (13)) of the test where b as "this % ';

REPLACE (B, CHR (13))
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
It is stop
space wear now


10:22:56 SQL > select replace (b, chr (13), chr (32)) test fix where b as "this % ';

DIFFICULTY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
It is stop
space wear now


10:24:19 SQL >


I would lilke to display on the same line.

Thank you.

Hello

SQL> select translate(b,chr(13)||chr(10),chr(32)) fix from test where b like 'this%';

FIX
----------------------------------------------------------------------------------------------------
this is stopspace now carry on

SQL> select translate(b,chr(13)||chr(10),' ') fix from test where b like 'this%';

FIX
----------------------------------------------------------------------------------------------------
this is stopspace now carry on

-Pavan Kumar N

Tags: Database

Similar Questions

  • Always replace the output file for serial port.

    Hello, I use Workstation 7 on Linux and use the option "Output to a file" serial port for the logging of messages to the client for debugging.

    It works perfectly, however, if the file exists already workstation asking what to do (crush, add, etc.). It works, but I would like to have the option to auto restart, restore, instant, etc. and this message gets in the way.

    Is he a .vmx parameter I can apply to my computer always replace the output file without asking?

    Yep - found

    you need these two lines:

    msg.autoAnswer = 'TRUE '.

    Msg. Serial.file.Open = 'Add '.

    _________________________

    VMX-settings- WS FAQ -[MOAcd | http://sanbarrow.com/moa241.html]- VMDK-manual

    You find me also in the PhD Virtual Backup support team

  • How to merge data from the table with a single line

    Hello

    I have three tables subscription_type, the address and the person. Here are the details of the table

    Person Subscription_type Address                                           

    Person_Id AdressType_id Address_id

    Person_name Description Address_type_id

    Person_id

    Address details


    There are three types of different address - home, postal and previous.

    Each person can have these three different addresses.

    I want to create a view that displays all addresses of three of each person in the table of the person in a single line.

    Any help please

    In your example, there are 2 rows of columns street1, TOWN, SUBURB etc for a single person. To convert this into a single line, with the new columns we could simply use CASES or DECODE in the select as the SQL below. To understand why consolidation function THAT MAX is used - remove the MAX and GROUP BY in SQL keyword and try.

    Select full_name

    , max (case when description = "Home" then end street1) Home_Street

    , max (case when description = "Home" then end suburb) home_suburb

    , max (case when description = end of the "Home" then City) home_city

    , max (case when description = "Home" then postal code end) home_postcode

    , max (case when description = "Home" then end state_name) home_state

    , max (case when description = 'Postal' then end street1) Postal_Street

    , max (case when description = 'Postal' and then end of suburb) Postal_suburb

    , max (case when description = 'Postal' then the city) Postal_city

    , max (case when description = 'Postal' and then end of CP) Postal_postcode

    , max (case when description = 'Postal' then state_name end) Postal_state

    , max (case when description = "Back" then end street1) Prev_Street

    , max (case when description = "Back" then end suburb) Prev_suburb

    , max (case when description = "Back" then city end) Prev_city

    , max (case when description = "Back" then postal code end) Prev_postcode

    address a

    S State

    No p

    Subscription_type att

    where a.person_id = p.person_id

    and a.state_id = s.state_id

    and a.address_type_id = att.address_type_id

    Full_name group

  • How to replace the output buffer?

    I'm a generation of finite signals 2 lanes on a0 and a1. I want to change one or the other of the waveforms at various times during the program and sometimes I have to be able to overwrite the contents of the buffer with a new set of data until the generation has run. Should be easy, but so far I have not figured out how do.

    When I try, the first attempt to crush the buffer I get error-200547 occurred .vi DAQmx Write (analog 2D NChan DBL NSamp) that says full buffer, cannot write more data until the task has been executed.

    How to clear the contents of the buffer or make it possible to replace the buffer?

    I found the solution, systematically through the palette DAQmx looking probable functions.

    Simply insert a DAQmx controls Task.vi before the write.vi DAQmx, with set to cancel the Action. You can write new data to the buffer.

    I knew there must be possible!

  • Including a carriage return when you write in a single register using Modbus

    I use a NI USB to RS - 232 to connect with a Watlow EZ-Zone PM controller using Modbus Protocol and will have bad to write a value (set temperature) to the controller.  I got when reading registry values, so I know that my settings are correct.  I also checked this using a program of Test of Modbus Watlow provides.  Using this program, it became clear to me that a carriage return is necessary after the numeric value.  MB series query writing Master only allows a value of U16.  How can I include a carriage return?

    A statement like that makes me think that she's not speaking modbus.

    Run their program during execution of something like Portmon.

    Then compare the data sent back with the modbus specification.

  • How to get the result of a single line in several columns

    I have a scenario where I asked five different columns in a table and it would still look back one line.

    So, for example: the query would be
     Select user1, user2, user3, user4 from table1 where tblkey= 2 
    So, this would mean 1 row with the value of their respective areas.

    In my code, I have a common function I can call to send an email to the list of people (User1, User2, user3, user4).

    So rather than call this function each time for each user, is there a way I can display the output to 4 different rows and use the loop For to call this function only once.

    In this way, the loop For running 4 times (if not nulls for all users) and call this function of e-mail.

    Really, I'd appreciate if someone could give me an idea of this scenario.

    Thank you
    AR

    If the number of columns is fixed you may be able to use this:

    SELECT  DECODE
            (
                    RN
            ,       1,USER1
            ,       2,USER2
            ,       3,USER3
            ,       4,USER4
            )       AS USERS
    FROM    TABLE1
    CROSS JOIN (SELECT ROWNUM RN FROM DUAL CONNECT BY ROWNUM <= 4)
    WHERE   TBLKEY = 2
    

    This UN-pivot results.

    Here's an example of it in action:

    SQL> CREATE TABLE TABLE1
      2  (
      3          TBLKEY  NUMBER
      4  ,       USER1   VARCHAR2(1)
      5  ,       USER2   VARCHAR2(1)
      6  ,       USER3   VARCHAR2(1)
      7  ,       USER4   VARCHAR2(1)
      8  );
    
    Table created.
    
    SQL> INSERT INTO TABLE1
      2  SELECT  ROWNUM
      3  ,       SUBSTR(OBJECT_NAME,1,1)
      4  ,       SUBSTR(OBJECT_NAME,2,1)
      5  ,       SUBSTR(OBJECT_NAME,3,1)
      6  ,       SUBSTR(OBJECT_NAME,4,1)
      7  FROM    ALL_OBJECTS
      8  WHERE ROWNUM <= 10;
    
    10 rows created.
    
    SQL> SELECT * FROM TABLE1 WHERE TBLKEY = 2;
    
                  TBLKEY USER1      USER2      USER3      USER4
    -------------------- ---------- ---------- ---------- ----------
                       2 I          _          U          S
    
    SQL> SELECT  DECODE
      2          (
      3                  RN
      4          ,       1,USER1
      5          ,       2,USER2
      6          ,       3,USER3
      7          ,       4,USER4
      8          )       AS USERS
      9  FROM    TABLE1
     10  CROSS JOIN (SELECT ROWNUM RN FROM DUAL CONNECT BY ROWNUM <= 4)
     11  WHERE   TBLKEY = 2
     12  /
    
    USERS
    -------------------------
    I
    _
    U
    S
    

    HTH!

    Published by: Centinul on February 24, 2010 11:21

  • Add the elements of a single line/column of a matrix

    Hi all

    What is the best way to add all the elements of a single row or column of a given matrix the matrix and the number of this line/column on LabVIEW? The output should be a number for each row or column.

    ARIJ,

    You always said not if you use a table or a matrix.

    The transposition has to be out of the loop.

    This will give you the sum of all rows and all columns.

    These are functions and LabVIEW base constructions. If you do not understand the concepts, please visit the online tutorials.

    Lynn

  • I fill out an application online for the school. Is it possible to configure Firefox to check the spelling in a single-line text box without having to right click each time?

    I want to be able to set the spell checker to occur automatically, even for single-line text boxes.

    You can set the pref layout.spellcheckDefault to 2 on the topic: config page to perform spell checking on line and unique multi line text fields.

    To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.

    If you see a warning then you can confirm that you want to access this page.

    • Use the filter at the top bar of the on: page config to more easily spot a preference.
    • Preferences that have changed see the bold (user set).
    • Preferences you can restore the default value or change via the context menu.
  • join in the query with the result of a single line

    Hi all

    I have two tables
    create table item(item_id number primary key,
    item_desc varchar2(200));
    
    create table item_properties(item_id number references item(item_id),
    property_name varchar2(20),
    property_value varchar2(100));
    I insert the following records
    insert into items values(1,'CPU');
    insert into item_properties values(1,'RAM','2gb');
    insert into item_properties values(1,'PROCESSOR','2ghz');
    insert into item_properties values(1,'HARDDISK','2ghz');
    commit;
    now I want a query that produces the following results
    item_id      RAM      PROCESSOR         HARDDISK
    1              2gb        2ghz              2TB
    How to generate this result?
    I create a query, but it generates several lines, instead I need a single line like above.
    select i.item_id,p.property_value from items i , item_properties p
    where i.item_id=p.item_id and i.item_id=1;
    Kind thanks.

    Published by: Maahjoor on May 7, 2013 12:22 AM
    select i.item_id,
           max(decode(p.property_name,'RAM',p.property_value)) ram,
           max(decode(p.property_name,'PROCESSOR',p.property_value)) processor,
           max(decode(p.property_name,'HARDDISK',p.property_value)) hd
    from items i , item_properties p
    where i.item_id=p.item_id
    and i.item_id=1
    group by i.item_id;
    

    Or pivot to 11g

    with details as
    (
    select i.item_id,p.property_name,p.property_value
    from item i , item_properties p
    where i.item_id=p.item_id
    and i.item_id=1
    )
    select *
    from details
    pivot
     (
       max(property_value) for property_name in ('RAM','PROCESSOR','HARDISK')
     );
    

    Published by: JAC on May 7, 2013 13:04

  • Hide all instances of the subform with a single line of javascript

    Is it possible to hide all instances of a subform with a single line of javascript?  I'm looking for something like this:

    repeatingSubform [*] .its presence = "hidden";

    but which caused the designer...

    Or do I have to loop through all instances of the subform and disable individually each of them?

    Thank you

    Elaine

    You must disable them individually

    Paul

  • return results as a query of single line sup.

    Hello

    It's my current query
    WITH car as (SELECT 'FORD' make FROM DUAL UNION SELECT 'TOYOTA' make FROM DUAL UNION SELECT'BMW' make FROM DUAL UNION SELECT 'FIAT' make FROM DUAL)
    SELECT * FROM CAR
    Which is: -.
    BMW
    FIAT
    FORD
    TOYOTA
    However, the actual output required: -.
    'BMW, FIAT, FORD, TOYOTA'
    that is, all turned around on a single line.
    Any ideas on how to do this?

    Thanks in advance!
    David

    Or

    SQL> ed
    Wrote file afiedt.buf
    
      1  WITH car as (SELECT 'FORD' make FROM DUAL UNION
      2               SELECT 'TOYOTA' make FROM DUAL UNION
      3               SELECT'BMW' make FROM DUAL UNION
      4               SELECT 'FIAT' make FROM DUAL)
      5  SELECT ltrim(sys_connect_by_path(make,','),',') as makes
      6  FROM (select make, row_number() over (order by make) rn from CAR)
      7  where connect_by_isleaf = 1
      8  connect by rn = prior rn + 1
      9* start with rn = 1
    SQL> /
    
    MAKES
    ------------------------------------------------------------------------
    BMW,FIAT,FORD,TOYOTA
    
    SQL>
    
  • How to replace the values in a single step

    Hi masters

    Please guide me,

    create table nums (number, number b, c number);

    Insert into SCOTT. NUMS

    (A, B, C)

    Values

    (1, 2, 3);

    Insert into SCOTT. NUMS

    (A, B, C)

    Values

    (null, 4, 5);

    Insert into SCOTT. NUMS

    (A, B, C)

    Values

    (6, 7, null);

    COMMIT;

    out of desire.

    ABC

    123

    45

    67

    concerning

    AR

    2742751 wrote:

    I think it's due to NULL values in the table. Use trim after concatenation columns to get required output

    So prove that you post.

  • Replace the string on a specific line

    Hi everyone thanks in advance for your time.

    I have almost finished a project, (a software to manage the booking of hotel rooms and a database of passengers).

    I made a function that writes a .txt file a cluster with some personal information string type fields, each field is separated by tabs, and each client separated by a line news.

    Example: name address phone etc.

    Robert xxxxxx yyyyyyy

    Patrick xxxxxx yyyyyyy

    Mila xxxxxx yyyyyyy

    Now I don't know how I can do to perform a search by name and to be able to change each field.

    Example:

    If I search for Patrick, I want to be able to change the address or phone number or any other field.

    I know how to search in a text file, until I reach the word, but I don't find a way to change the field and write once again the information in the same file in the same line of origin.

    Any contribution will be great! Thanks again.


  • selection menu/popup/back of the box to a single line

    I am trying to program a control that allows the user to choose among 7 different options. The options are each other and collectively exhaustible (in other words, one must be selected at all times). I tried a menu box that begins with a single visible line (the line that contains the currently selected choice). Is that I wish it works: - when the user clicks on the box, all of the 7 choices appear - the movements of the user the cursor on the desired selection and releases (or clicks; I don't like) - the new selection 'takes' - the box comes back to the display of line one, I have the first part of work, but I can't find the right event (s) to do the rest. I'm on the right track? Suggestions to make this work? Thank you.

    I agree that any type of control of the ring is a good choice, an appropriate event is EVENT_VAL_CHANGED.

    But I also remind you that the CVI comes with a large collection of examples of programs, some of them also include controls of the ring. Analyze these samples can also familiarize themselves with CVI.

  • What is the problem with this single line of Java code in the software special approval BPEL code?

    Hello

    My java code does not build in jdev if I leave this line in java tissue BPEL code

    Criteria of SearchCriteria = new SearchCriteria (AttributeName.USER_LOGIN.getId (), une_chaine, SearchCriteria.Operator.EQUAL);

    With the help of Jdev 11.1.1.7.0

    oimclient is inside of the SCA-INF/lib, manifest says it is version 11.1.2.2.0

    Error message does not say much

    at com.collaxa.cube.lang.compiler.template.CubeProcessGenerator.compile(CubeProcessGenerator.java:313)

    at com.collaxa.cube.lang.compiler.template.CubeProcessGenerator.generate(CubeProcessGenerator.java:169)

    at com.collaxa.cube.lang.compiler.BPEL1Processor.transform(BPEL1Processor.java:257)

    at com.collaxa.cube.lang.compiler.BPEL1Processor.process(BPEL1Processor.java:161)

    at com.collaxa.cube.lang.compiler.CubeParserHelper.compile(CubeParserHelper.java:47)

    at oracle.fabric.bpel.bpelc.BPELComponentValidator.validate(BPELComponentValidator.java:40)

    at oracle.soa.scac.ValidateComposite.validateComponentTypeServicesReferences(ValidateComposite.java:1066)

    at oracle.soa.scac.ValidateComposite.doValidation0(ValidateComposite.java:514)

    at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:493)

    at oracle.soa.scac.ValidateComposite.run0(ValidateComposite.java:214)

    at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:195)

    at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:187)

    Do I need exactly the same version of jdev to oimclient?

    TIA

    Leo

    Well it seems to work when I remove all imports, even classes in java.util. as map, list, etc.

Maybe you are looking for

  • I can't change an Apple ID

    When I try to update my application appear a different ID and I can not change

  • 36 Firefox has a bug. The scrollbar of sinople and Hor. the event onscroll a js whose name is roll

    36 Firefox has a bug. I reported it to bugzilla almost 3 weeks ago. This is a serious bug, my clients do not work normally. No not yet revisited this bug and no one has contacted me. https://Bugzilla.Mozilla.org/show_bug.cgi?id=1137608 http://jsfiddl

  • Logging in iCloud crashes my iMac AND my new mini

    This is a new problem. Out of the blue. iCloud brings my two year old iMac to a standstill. Join my new Mac Mini caused the same problem. Everything is at a snail pace. Finally, I had to wipe my iMac. Connected to iCloud and BAM - screeching halt.

  • incorrect account of RAM in BIOS

    When my system starts up, it reads that I 2555 KB of memory when actually, I installed 4.0 concert.  I have Corsair Ram that is supposed to be the ram "gamers" who I'm supposed to be able to overclock or twist.  I did nothing of the sort so far.  I'm

  • BlackBerry Smartphones how not to receive certain email

    Can someone please help with how to stop get Blackberry e-mails which are used to carry data between your handheld and the server. They all have different addresses starting with network@etp etc. I get one of these every 20-30 minutes which, during 2