Newline characters data( either chr(10) or chr(13))

I have 2 columns in a table and these columns have newline characters data( either chr(10) or chr(13)).
Now I need to fetch data so that all the records which have new line character( either chr(10) or chr(13) ) in any of these 2 columns should be retrieved.
create table sri_newchar (name varchar2(100))
insert into sri_newchar values('Sri'||chr(10)||'Ram'||chr(13)||'Kumar')
insert into sri_newchar values('Sri'||chr(13))
insert into sri_newchar values('RajeshMishra')
insert into sri_newchar values('Sri'||chr(10)||'Raj'||chr(13)||'Kapoor')
insert into sri_newchar values('Sri'||chr(13))
insert into sri_newchar values('Vinod'||Chr(10)||'Shimla')
insert into sri_newchar values('Rajkumar'||Chr(10)||'Goyal')
I have return query like
select * from sri_newchar where name like '%'||CHR(10) ||'%'
any other way to write this query
Please help me with a correct query for this task.

nav wrote:
Now I need to fetch data so that all the records which have new line character( either chr(10) or chr(13) ) in any of these 2 columns should be retrieved.Try
select * from Sri_Newchar where instr(name,chr(10)) >0 or  instr(name,chr(13)) >0Vivek L

Similar Messages

  • Need a query to find newline characters data( either chr(10) or chr(13))

    I have 5 columns in a table and these columns have newline characters data( either chr(10) or chr(13)).
    Now I need to fetch data so that all the records which have new line character( either chr(10) or chr(13) ) in any of these 5 columns should be retrieved.
    Please help me with a correct query for this task.
    Edited by: nav on Jun 2, 2011 10:21 PM

    An example .. you can do it for all 5 columns adding "OR" conditions
    with t as
    (select 'Arun'||chr(10) a, 'Gupta'||chr(13) b from dual union all
    select 'Dinesh'||chr(10) a, 'Kumar'||chr(13) b from dual union all
    select 'Naresh'||chr(10) a, 'Raja' b from dual union all
    select 'Harish' a, 'Mahesh' b from dual union all
    select 'Jatin'||CHR(13) a, 'Mahesh' b from dual
    select * from t  
    where a like '%'||CHR(10)
           or a like '%'||CHR(13)
           or b like '%'||CHR(10)      
           or b like '%'||CHR(13)       Regards
    Arun

  • Spurious newline characters in xml form data

    I have been given a pdf form(XFA).  I have a button that the end user can click and when they do so, it posts the form data as XML to a url.  The problem I am having is that it seems to be adding in newline characters like so:
    <?xml version="1.0" encoding="UTF-8"?>
    <topmostSubform><b12c96nfCert_Nbr>1234
    </b12c96nfCert_Nbr>
    <b12c96nfOwnship_ID
    />
    </topmostSubform>
    (this isn't complete stream, just a small sample.  The newlines are screwing up my xml parser.  Is there any way I can prevent this, or post lean xml with no whitespace?
    I have been stripping newline characters inside my service, but obviously this is less than ideal.
    When I save the xml directly out of the pdf, it contains these newline characters as well.  How can I remove them?
    With Respect,
    mattie

    You could use a regular expression. For example,
    var str = this.rawValue;
    this.rawValue = str.replace(/\r|\n/g,"");
    will globally replace carriage returns (\r) or line feeds (\n) with "".
    Steve

  • Arabic Characters data is retrieved ??? from database

    Hello
    on entering Arabic Characters data is retrieved ??? from database 10G 2
    any suggestions pls
    my pc lang is Arabic default
    my nls_lang is ARABIC_SAUDI ARABIA.AR8MSWIN1256
    both for : KEY_DevSuiteHome1
    and the : KEY_OraDb10g_home1
    Regards,
    Abdetu

    If this is a recent installation and the non-Arabic data in the database isn't critical, the simplest solution would be to delete the existing database on your colleague's machine and to create a new one. Assuming you're using the DBCA to create the database, make sure when going through the installation this time that the database character set supports Arabic data (i.e. a database character set of Windows-1256 or UTF-8).
    And if these databases are intended to be separate development databases for the same project, I would suggest spending some time working on developing a process to ensure that each developer's local instance is configured identically and that these configurations match the production configuration. It would be unfortunate, for example, if you were developing on a Windows-1256 database and the production database turned out to have a different character set. The simplest (though not necessarily most elegant) solution would probably to create a template using the DBCA and to use that template on each developer's machine rather than having people individually click through the installer.
    Justin

  • More than 1023 characters data in basic report layout?

    Hi,
    Am developing a basic report, where in I have to accommidate around 1100 characters data in a line (columnn headings itself are taking 1080 characters), but system is allowing only 1023 characters, pls. let me know how to achive this?
    Thank you

    If a bottle can only hold 1 litre and you are told to put 2 litres in it, would you also ask how you should do it?
    Why don't you just break up 1 line into 2 separates lines?

  • Non permitted characters-data loading

    In our system, we have a data issue where many records present in the entry level tables (Extraction Layer) have non-permitted characters in text fields.
    we introduced a routine to filter these - but already existing ones will bring problems during the init.
    for this we need a very tricky abap.
    we have a FM to replace wrong characters.
    So now I want to loop a whole databasetable and use the FM against a certain table field
    We did something like that  with abap already. But the biggest issue is that the tables consist of several million records - so we run into memory problems.
    can you please provide a suggestion on how to handle this?
    Your help will be appriciated

    hi  USER1249,
    what about to use standard BW functionality - permitted characters - TA RSKC.
    Via this you can maintain a set of permitted characters which will not be rejected by BW while loading.
    BR
    m./

  • Unable to process EDI Input Message with NewLine Characters

    Hi All,
    I am using the Seeburger adapter and modules to process the Input EDI message. The input message comes with a new line character after every 80 characters. Hence the Seeburger modules throw an error while reading the file. I tried using the /Seeburger/ReplaceString module. In module config, it has 2 parameters - searchString and replaceString. It works for any special characters like "#" or '!' , but does not replace the NewLine character. I used '\n' ,   '\r' ,  '0x0A' ,  '0x0D', '0D0A' and none of them worked. Can anyone please suggest what character needs to be used in the Module Config?
    Thanks,
    Geetha

    I have done it in other way by relacing "~" with new line within UDF. We can try to replace the corresponding values 13 and 10.
    Basically, the code to add next line characters is:
    inputString.append( ( char ) 13 );
    inputString.append( ( char ) 10 );

  • GUI_UPLOAD output for a record having 130 fields [ 400 characters data ]

    Hi Experts,
    While working with GUI_UPLOAD, the output internal table record is limiting the characters.. but my requirement is a record containingg 400 + character... i.e, nearly 130 fileds in a record..
    Can you please help me how to do.
    Thanks & Regards,
    Bhaskar.

    Hi,
    Try using FM "WS_UPLOAD".
    Regards,
    Roger

  • Number of rows in a clob

    I've a CSV file, stored in my database as a CLOB. I've a plsql cartridge that reads the clob and displays the data to the user as a html table. I'm using string functions, instr and substr to extract the data from the csv file.
    My CSV file is basically a converted version of an Excel spreadsheet uploaded by the user. It will always have a standardized format, with same number of columns. The first 10 rows will always be header information and data will be from row 12 onwards. Row 11 is empty.
    I'm trying to find a way to count the number of rows in the CSV file (clob) so that every time I read the data, I can ignore everything before row#12.
    I'm hitting a wall with what the approach should be.
    Any help appreciated.

    Scorpio_ wrote:
    I've a CSV file, stored in my database as a CLOB. I've a plsql cartridge that reads the clob and displays the data to the user as a html table. I'm using string functions, instr and substr to extract the data from the csv file.
    My CSV file is basically a converted version of an Excel spreadsheet uploaded by the user. It will always have a standardized format, with same number of columns. The first 10 rows will always be header information and data will be from row 12 onwards. Row 11 is empty.
    I'm trying to find a way to count the number of rows in the CSV file (clob) so that every time I read the data, I can ignore everything before row#12.
    I'm hitting a wall with what the approach should be.
    Any help appreciated.A CLOB is just a Character Large Object. It has no concept of rows etc. It is just a large storage space for character data.
    Clearly you have a concept of what a "row" is, so you will have to write some code that looks for the character(s) that represent the end of a "row" and count those. e.g. if your data has newline characters (e.g. chr(13)) within it and these represent the end of a row, you would scan through the CLOB for those characters.
    As we don't have any example data to work with (and no database version) it's not possible for us to provide you with any more information.

  • Check either String data is ASCII or Unicode

    Hi,
    How can we check String(Array of Characters) data is ASCII or Unicode using java.
    Please reply immediately.
    Thanx in advance.

    Hi,
    How can we check String(Array of Characters) data
    is ASCII or Unicode using java.
    Please reply immediately.that's not the correct way to ask :P
    >
    >
    Thanx in advance.

  • How to remove a newline character from a column

    hi all...
    i have a column in a table in which some of the datas contain a newline character at their last.
    i need to remove those newline characters.
    for example.... a data is
    'abcd
    (notice the end of the quotation).....i need to get the data as...'abcd'
    plss help me...
    thanks in advance..

    thanks for ur reply...
    i got your point..but here what you have done is....u have inserted a particular character set in between 'abcd' and 'xyz' and afetr that just replaced those character set by null....
    but in my case the problem is a bit different...
    the datas are already present and what i have to do is to remove the newline spaces from the end of the datas.
    select replace(column_name,'<what shall i put here>',null) from table_name;
    in your example...that is 'chr(10)'...but in my case its a newline character....

  • How to remove the newline character at the start in the attachment ?

    Hi All,
    I have been trying to attach a .dat file generated at an external source and send it as an attachment by mail using UTL_SMTP, all things are working but the .dat file which comes attached in mail contains a newline character i.e. chr(10) at the start line and the contents of the file are written from second line onwards. Below is some part of the code which deals with read/write of attachment of mail to be sent.
    Can anyone help me on this, is something to be changed in this code??
    UTL_SMTP.write_data(c,
    'Subject' || ': ' || P_SUBJECT || UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    'MIME-Version: 1.0' || UTL_TCP.crlf || -- Use MIME mail standard
    'Content-Type: multipart/mixed;' || UTL_TCP.crlf ||
    ' boundary="-----SECBOUND"' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 7bit' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf || l_text);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
    UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
    'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
    TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
    UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);
    BEGIN
    l_filehandle := UTL_FILE.fopen('c:\temp',
    'FS_Extract.dat',
    'r',
    32767);
    LOOP
    UTL_FILE.GET_LINE(l_filehandle, l_buffer, 32767);
    UTL_SMTP.write_data(c, l_buffer || UTL_TCP.crlf);
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    UTL_FILE.fclose(l_filehandle);
    UTL_SMTP.write_data(c, '-------SECBOUND--');
    UTL_SMTP.close_data(c);
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    BEGIN
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    NULL;
    -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The quit call will raise an
    -- exception that we can ignore.
    END;
    RAISE_APPLICATION_ERROR(-20000,
    'Failed to send mail due to the following error: ' ||
    SQLERRM);
    END;
    Thanks,
    -Amol

    As I recall, a single blank line serves as separator between Mime Header and Mime Body.
    This code..
    UTL_SMTP.write_data(c,
      '-------SECBOUND' || UTL_TCP.crlf ||
      'Content-Type: text/plain;' || UTL_TCP.crlf ||
      ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
      UTL_TCP.crlf ||
      'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
      'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
      TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
      UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);  ..generates 2 blank lines after the Mime Header.
    Remove the last CRLF and see if that does the trick.

  • Capturing returns and other special characters

    Greetings,
    I'm curious to know what is 'normally' done to capture
    returns and other special characters from textareas. I want my user
    to be able to insert 'control' characters into the text area to
    allow them to provide some structure to the information they're
    entering. At the moment, I'm processing the text char by char and
    working out if it's an 'enter' or whatever, then appending a
    '<br />' to the string before I store it and so on.
    Is there a more established way to do this sort of
    thing?

    Use the replace function to replace either chr(10) or chr(13)
    with a break tag. It's using cold fusion functions to accomplish
    the same thing you appear to be doing manually.

  • How to remove characters/lines from the beginning of an InputStream

    Hi,
    I have a program which receives several InputStreams. From each of these streams I have to remove 2 lines from the beginning. After the lines are removed, all the streams are combined to one with SequenceInputStream and read in one chunk. Is there an easy/simple way of doing this?
    One option I thought would be to read the char by char until 2 end of line chars have been detected and then read the rest of the data to a buffer. And the create a ByteArrayInputStream out of this buffer. Problem with this approach is, that the amount of data can be large, so putting all the data in to memory might cause problems.
    Another option is to use BufferredInputStream and use the readline() method twice to get rid of the lines that are not needed. After this I would write the data to some output stream, which is then converted back to input stream. Propably would work, but sound too much of work for a simple thing like this. There has to be better way.
    To make it simple, what I need is a method that looks like the following, or something similar
    *  Removes n number of lines from the beginning of a InputStream.
    *  @param is InputStream where the lines are removed
    *  @param numberOfLines int value to indicate how many lines whould be removed
    *  @return InputStream where lines have been removed.
    public InputStream removeLines(InputStream is, numberOfLines);Thanks.

    Here's the code, feel free to use it. Comments are also welcome.
    public InputStream removeLinesFromTheBeginning(InputStream is, int numberOfLines) throws IOException
              char c = 'c';
              int i = 0;
              for(int n = 0 ; n < numberOfLines ; n++)
                   do
                        c = (char)is.read();
                        System.out.print(c);
                        if(c == (char)-1)     // end of stream reached before any newline characters were found.
                             return null;
                        i++;
                   while(c != '\n');
                   System.out.println();
                   System.out.println("Characters removed:" + i);
                   System.out.println("n: " + n);
                   i = 0;
              return is;
         }Edited by: dave_spaghetti on Jun 16, 2009 5:42 AM
    Fixed a bug.

  • Apple Users Data Doesn't Show in PDF Form

    Hello,
    We created a form using Acrobat 9.  The form can be filled in and saved so people can email it back to us.
    Whenever I receive a form from somebody that is using an Apple, the characters they have typed, don't show up in the boxes unless you click the box where the data should be.  It won't print the data either.
    For example, let's say I have part of the form where people type a paragraph.  When they email the form over, it's blank....unless I click the box the data in is, they it shows up.  This only happens with Apples users.
    Do you have any thoughts on why this is and how to correct it?
    Thanks!
    Dave

    Hello George,
    Thanks for the feedback.  Forgive my naivety but if Apple users are using a 'preview' mode, are they still able to type and save the data then?  I am getting these PDF's back with the data in the fields, but I have to click the box to view it.
    Currently, I am doing what you describe in that I have to open a blank document, and copy/paste the info over.
    Is there a 'Apple' version I can create for Mac users?  It's strange to think that Mac users can't use the same form....
    Thanks for you input!
    Dave

Maybe you are looking for

  • 5.1 or 7.1 external sound card

    I have a new iMac but it only has a 2.1 optical audio output on the back. I'd like to connect a 5.1 DD external sound card USB 2.0 (maybe even up to 7.1 Dolby Digital) to it to connect to my DD receiver. However, I am also using Windows Vista Ultimat

  • How do I set up a new username?

    How do I set up a new username for iPhoto?

  • Letter of credit reports

    Hi, Is there any standard report which gives me the details of LC value,  assigned balance and open value. who is the ship to party and valid from and valid to. Thanks in Advance, Raghava

  • Status YELLOW in the monitor

    Hello SDN, I made some changes to my datasource in R/3 and tried to extract the data from BW with out replicating the Datasource. The load is running from long time and it is till showing the status 'YELLOW'. Now, I want to stop the load both on BW s

  • Custom compound element in custom web form.

    I would like to create a custom compound element that is a combination of paragraph and picture side by side. If the user didn't use the picture from this element, it still has to render as a normal paragraph, and vice versa. Can anybody give me idea