Remove no. of character

Hi all,
i want to delete 50 character from a string.
which function shuld i use to delete 50 character from a string

This pseudo-code should give you a good start:
UPDATE  <TABLE>
SET     <COLUMN NAME> = SUBSTR
                                <COLUMN NAME>
                        ,       1
                        ,       LENGTH(<COLUMN NAME>) - 50
WHERE   <CONDITIONS>;

Similar Messages

  • Remove unicode control character

    hey, so i've asked this around a few places and recieved no answers, but the arch community seems like a bunch of smart people and i've recently switched over from ubuntu.
    is there a way to remove input methods and unicode control characters from the context (right-click) menu? i've searched and searched, but i've had no luck with this.
    there's a way to remove it in gnome with gconf, but i've tried that, and no luck.
    i'm using openbox, and i think i found something about my gtkrc file along these lines
    gtk-show-input-method-menu =
    gtk-show-unicode-menu =
    both are "gboolean" which i don't know what it is, or if this is even what i want.
    any help would be appreciated, as i never use these menus.

    U+2415, SYMBOL FOR NEGATIVE ACKNOWLEDGE is not a control character. It is a normal symbol character, which is a substitute display character used when the control character U+0015 NEGATIVE ACKNOWLEDGE is to be displayed instead of being interpreted.
    You need to refine your question.
    In general, you can remove any particular character or characters from a string using the SQL functions TRANSLATE or REPLACE. You can use CHR or UNISTR to encode characters that you cannot enter from a keyboard. You can use REGEXP_REPLACE with POSIX character classes to remove broader ranges of characters.
    -- Sergiusz

  • Remove last newline character

    How can I remove the newline character only from the very end
    of a string? (Note there are several newline characters within the
    string). Thanks!

    How long is the string and roughly how many newline
    characters are there? One way, although kinda funky, would be to
    convert the newline-delimited list to an array, and then convert it
    back. See below.

  • How to remove new line character from query output?

    Hi,
    How to remove new line character from query output?
    have tried select replace(column_name, CHR(10), ' ') from table_name.
    Edited by: GreenHorn on Sep 11, 2008 12:53 AM

    Please consider, that windows uses a sequence of chr13||chr(10) Unix uses only one character chr(10).
    The new line character(s) may be OS-dependent.
    You could consider both with:
    replace(replace(column_name, CHR(13)||CHR(10), ' '),CHR(10),' ')
    Hartmut
    Edited by: hartmutm on 11.09.2008 01:32

  • How to find and remove any special character in filename?

    I have a files in various Windows Servers 2003 with a special character at his names, who are causing problem with backup software, i don´t know what character is because in explorer they are not shown and in command line they are shown only as interrogation
    mark and for this, i don´t know how i will find and remove then.
    Thanks.

    Hi,
    I agree with Dave. We can try using
    chkdsk utility to check the file system and file system metadata of a volume for logical and physical errors.
    Regarding
    chkdsk, the following article can be referred to for more information.
    Chkdsk
    http://technet.microsoft.com/en-us/library/cc730714.aspx
    Best regards,
    Frank Shen

  • 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.

  • Remove non ascii character

    i need a SQL or Procedure that will search non ascii character  in data and update the data by removing it
    Suppose there is table TABLE1 with Column NAME
    it contain number of row and few has non ascii character eg 'CharacterÄr'
    My sql or procedure should be able to search  'CharacterÄr' and update the row with 'Character'
    i.e. removing the non ascii character 'Ä' from the data

    Hi,
    Okay, in that case:
    SELECT str
    ,      REGEXP_REPLACE ( str
                          , '[^[:cntrl:] -~]'
                          )   AS new_str
    FROM    table_x
    or, to actually change the rows that contain the bad characters:
    UPDATE  table_x
    SET     str = REGEXP_REPLACE ( str
                                 , '[^[:cntrl:] -~]'
    WHERE   REGEXP_LIKE ( str
                        , '[^[:cntrl:] -~]'

  • Removing New Line Character in Input file

    Hi Experts,
    I Have a question about "New Line Character". I searched in SDN before posting this thread, But I didn't get answer.
    Question:
    Let me say my Client requirement first. After loading the data(Millions of Records) into SAP through LSMW, they asked write a program for validation of those loaded records based on I/P file. I wrote a program and It is success full.
    But, the problem is when file is in Application server in 'BIN' format, a new line character(#) is created. While comparing the last record of each line, it doesn't match. How to remove this new line character(#) in I/P file for each line of record? Please see the below records for example
    PROVINCIA DE BUENOS AIRE|   |1870|AR| #
    PROVINCIA DE BUENOS AIRE|   |1876|AR| #
    BOX 7407 PRINCETON|   |085437407|US|NJ#
    5756 2 A   CAPITAL FEDERAL|   |1431|AR|00#
    Note: This New line character is not matching the string "#".
    Please help me guys, so many objects are related with this concept. I appreciate quick response. Please.
    Thanks
    Sai

    Hi Arun, Ravi,
    I wrote the code like this, here 'fil_curre' is currency key.
    IF <l_wa_file_data>-fil_curre CS cl_abap_char_utilities=>newline.
              REPLACE ALL OCCURRENCES OF REGEX cl_abap_char_utilities=>newline
                                            IN <l_wa_file_data>-fil_curre WITH ''.
            ENDIF.
    While executing the code, the cursor here, simply jumps to next step.
    Any enhancements to this code or any new ideas?
    Thanks
    Sai

  • SQL*Loader sqlldr removes zeros from character field

    Hello,
    I am using SQL*Loader to load an Oracle table, and am having a problem. One of the fields is defined as VARCHAR2 and contains comments entered by a user. There may be numbers or dollar amounts included in this text. When I execute the sqlldr script below, the result is that all of the zeros on the text field disappear. There is a translate function invoked for this field (bolded statement) in an attempt to remove imbedded newlines from the text. Wherever there was a zero in the original text, it ends up being removed after I run this script. Can anyone suggest why this is occurring, and how to prevent it? Can it be related to the translate function?
    Thanks for your help!
    OPTIONS (READSIZE=20971520, BINDSIZE=20971520, ROWS=20000)
    LOAD DATA
    INFILE 'R24.REGION.ERL.N1E104' "str X'5E5E220A'"
    BADFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_BADDATA.TXT'
    DISCARDFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_DISCARDDATA.TXT'
    REPLACE
    INTO TABLE TESTM8.CONV_BUT_RS_ASSGN_TXT
    FIELDS TERMINATED BY '~' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    RST_RS_EXT_TXT_OID DECIMAL EXTERNAL,
    RST_RS_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_RS_ASSGN_OID = 'NULL',
    RST_TXT_SEQ_NBR INTEGER EXTERNAL,
    RST_RS_COMM_OID DECIMAL EXTERNAL,
    RST_DIF_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_DIF_ASSGN_OID = 'NULL',
    RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#0x0A', '#'), 1, 248)"
    --------------------------------------------

    Never mind, found my mistake. In the TRANSLATE function, I had assumed that the 0x0A would be interpreted as a single hex value. Instead, it is interpreted literally as the character '0', the character 'x', the character 'A', etc. The result is that the transformed text had no '0', 'x', or 'A' characters, which is exactly what I inadvertently told it to do. I changed it to the following, which works better ;-)
    RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#'||CHR(10), '#'), 1, 250)"

  • 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....

  • Please remove remaining 255 character API limitations

    I develop a library for creating .xll add-ins using the Excel C API (as described in the Excel SDK:
    http://msdn.microsoft.com/en-us/library/office/bb687883(v=office.15).aspx ). However, this discussion also applies to the COM Automation interfaces, as used from VBA or VSTO.
    Since Excel 2007, the 255 character limitation for strings in Excel C APIs have been lifted. In particular, the C API supports long Unicode strings up to 32767 characters in most places. However, there are
    a number of C API calls where the 255 character string limitation remains. Typically, the corresponding COM Automation call has the same limitation, so these seem to be inherent in Excel at some level.
    I highlight two cases:
    * the C API call xlcFormulaConvert is used to convert formulas between A1 and R1C1-style references. If the resulting converted formula would be longer than 255 characters, the API call fails. Likewise, the corresponding
    COM call is Application.ConvertFormula, and has the same limitation of 255 character strings and returns Error 2105 for strings that would be longer than 255 characters. see the Remark in the documentation here: http://msdn.microsoft.com/en-us/library/office/ff822751(v=office.15).aspx
    * the C API call xlcFormulaArray has a similar limitation, as does the COM Automation equivalent,Range.FormulaArray, as documented here: http://support.microsoft.com/kb/213181
    (first noted in Excel 2000, but still present in Excel 2013) and here:
    http://msdn.microsoft.com/en-us/library/office/ff837104(v=office.15).aspx. Workarounds for this bug are very hard to implement, an example is this extensive discussion from 2005: http://dailydoseofexcel.com/archives/2005/01/10/entering-long-array-formulas-in-vba/
    Various other function have similar limitations, e.g. Match
    and Replace, RTD topic strings.
    I am posting here, in hopes that there is some way for this issue to make its way to the Excel team. These limitations still remaining from previous versions cause ongoing pain, and I would like to plead that they get some attention for future Excel
    releases.
    -Govert
    Excel-DNA - Free and easy .NET for Excel

    Another place where this limitation is present (still in Excel 2013), is in the strings passed with a C API call to
    xlfRegister, used to register a UDF. While the C API has supported long Unicode strings since Excel 2007, calls to xlfRegister will fail if any of the strings are longer than 255 characters.
    The limitation is particularly inconvenient in this call, since one of the strings represents the concatenation of parameter names displayed in the Insert Function dialog. So the total length of parameter names (including separator characters between parameters)
    cannot be more than 255 characters - a limit that is quite easily bumped into.
    This affects any add-in based on the C API, whether developed in C/C++ or a managed helper library like Excel-DNA.
    -Govert
    Excel-DNA - Free and easy .NET for Excel

  • Removing new line character in jdk 1.2

    I am currently using replaceAll("\n", "") to remove new line characters in an string. But this works only for 1.4 version, I know need to have this work on 1.2 and 1.3.
    Is there an alternate method that I can use?

    If the string come from a file that's in the native text format for that platform, then replaceAll(System.getProperty("line.separator", "") will work.
    This won't work, however, if you, say, create a text file on windows and the read it on Unix without translating the EOL characters.
    If you can't be certain that the file is in the format that matches the current platform, three options pop to mind:
    * Run over the String, char by char, copying all chars to a new String except \r and \n.
    * Use two replaceAll calls--one with \r and one with \n.
    * Dump the String into a StringReader, then wrap the StringReader in a BufferedReader. Call readLine() on the BufferedReader in a loop, concatenating the results in a StringBuffer as you go.

  • How to remove the ^M character?

    I'm porting applications from Windows to Solaris. My cpp programs failed to compile in some cases because of the ^M characters at the end of each line. Does anyone know how to remove them systematically? The applicaiton has hundreds of files. It's pratically impossible to use text editor to chop it off.

    Here is a useful little script I wrote. It needs to be in your $PATH because it is mildly recursive...
    #!/bin/sh
    if [ "$1" = "" -o "$1" = "-h" ]; then
    cat 1>&2 << END_OF_HELP_TEXT
    USAGE: crlf [-h] <file | directory> [...]
    OPTIONS: -h Display this help text
    DESCRIPTION: The specified files are converted from
    DOS to UNIX format, regardless of file
    type, as described in the notes section.
    The specified directories are descended
    recursively, but only the following
    file types are converted by default:
    Makefile, makefile, \*.mk, \*.gmk,
    \*.h, \*.c, \*.cpp
    NOTES: The DOS to UNIX file conversion implies
    at least the following changes:
    1. Make the file writable (chmod u+w)
    2. Strip carriage returns (0x0d)
    3. Terminate with a line feed (0x0a)
    END_OF_HELP_TEXT
    exit 1
    fi
    while [ "$1" != "" ]
    do
    if [ -f "$1" ]; then
    # Get permissions
    permissions="u+w"
    if [ -x "$1" ]; then
    permissions="$permissions"x
    fi
    # Convert the specified file
    /usr/bin/echo "$1"
    /usr/bin/chmod u+w "$1"
    /usr/bin/dos2unix -ascii "$1" "$1" 2>/dev/null
    offset=`ls -l "$1" 2>/dev/null | awk '{ print $5 }' 2>/dev/null`
    offset=`expr "$offset" - 1 2>/dev/null`
    if [ "$offset" -ge "0" ]; then
    terminator=`od -x -j "$offset" "$1" 2>/dev/null | head -1 2>/dev/null`
    if [ "$terminator" != "0000000 0a00" -a "$terminator" != "" ]; then
    echo "" 1>>"$1" 2>/dev/null
    fi
    fi
    # Set permissions
    /usr/bin/chmod "$permissions" "$1" 2>/dev/null
    else
    # Convert all source files in the specified directory
    /usr/bin/find "$1" -follow -a -type f -a \
    \( -name "[M,m]akefile" -o -name "*.mk" -o -name "*.gmk" \
    -o -name "*.h" -o -name "*.c" -o -name "*.cpp" \) \
    -exec crlf {} \;
    fi
    shift
    done
    exit 0

  • Remove first selected  character

    Hi all,
    I have one requirement , in my one table A _POSTN  there is Column NAME I this column values like
    DEFAULT_NZ_FUELS_WHOLESALE_1,
    Z_FALAGUB,
    DEFAULT_UK_ILS_LUBES_1
    etc
    I want output for only those record Z_FALAGUB, Z_REHMEN, output should remove “Z_” and FALAGUB, REHMEN like that
    I am trying “SUBSTR(E.NAME,INSTR(E.NAME,'Z_')+2) from dual “ this statements
    But it is removing “DEFAULT_NZ_FUELS_WHOLESALE” Z_ also . can anyone help me for that

    You want to test if the first two characters contain 'Z_', while INSTR will check the whole string.
    If found at the start, it will return 1 and you will want to to start the first SUBSTR from position 3 and otherwise start from 0 (that's what the DECODE is for).
    I did this without really testing, but give it a try.
    SUBSTR(E.NAME, DECODE(INSTR(E.NAME, 'Z_'), 1, 3, 0)) from dual

  • Perl command to Remove Extraneous ^M character

    In preparing a fortran program with word and saving it in a text format -extraneous end-of-
    line characters appears ^M when displaying the file on unix with more command.
    What perl command will remove these characters ?
    What is the recommended applicationfor preparing a fortran program to be compiled by g77? On linux machines I use a full screen emacs editor with pull down menus. This does not exist on the Mac.

    Use either
    perl -pi -e 's|
    |
    |g' file.f
    or
    perl -pi -e 's|
    ||g' file.f
    depending on whether you are dealing with Classic-Mac or Windoze line endings.
    g77 is obsolete.
    gfortran is the current gnu fortran compiler. Intel also makes a proprietary fortran compiler.
    more info
    You can write code in any number of text editors. more info You should set them to use unix line endings.
    If you want to stick with emacs, you can install the same X11-based xemacs you have on linux, or you might prefer to try a native interface: aqua-emacs.

Maybe you are looking for

  • A Plea for Help with Sound Issues

    After hooking up my new Mackbook Pro with an external HDMI display I have lost audio on most audio enabled applications including iTunes, Real Player, VLC. QuickTime still has audio as well as the Finder and sound effects. My audio preferences are se

  • 3d txet off in my ps how i can make it on ?

    in the start he was open 3d text and i do new layer and type any thinke 3d off  why ?!

  • Multiple child tables and repeating frames

    I have three tables(A,B,and C) where A is the parent of both B, and C. There is no relation between B and C.In the data model, There are three queries, one to each table and I have set up the parent/child relationship in the data diagram. In the layo

  • Making cell non editabale (of dynamic table) in alv

    Hi, I am working on a editable alv with a dynamic table <itab> .This table gets populated during runtime.Now I want to make few cell of this table not editabale (only few cell not the full columns) I knwo that the procedure is to declare my outtab li

  • Urgent - ORDM Query

    Hi, I am new to ORDM. Can you please let me know where from I can get the Installer? I've tried in edelivery and downloads.oracle.com , but no luck yet. Also, whether we it's a feasible option to use ORDM for Operational reporting on the base tables.