How to strip extra spaces

I have a cfinput bound to a cfgrid based on a DB query. The
zip field in the DB has a length of 20 chars. When the zip binds to
my cfinput it pulls the data, including the extra spaces after it,
for instance "02134 ". My cfinput zip field validates for ZIP, so
the validation fails because of the extra spaces. Is there a way to
strip these??
Thanks. --Steve

Depending on what DB you are using trim the space in your
query.
Select rtrim(zipcodes) as zipcodes
"sbrehm" <[email protected]> wrote in
message
news:eknci3$jdp$[email protected]..
>I have a cfinput bound to a cfgrid based on a DB query.
The zip field in
>the DB
> has a length of 20 chars. When the zip binds to my
cfinput it pulls the
> data,
> including the extra spaces after it, for instance "02134
> My
> cfinput zip field validates for ZIP, so the validation
fails because of
> the
> extra spaces. Is there a way to strip these??
>
> Thanks. --Steve
>

Similar Messages

  • How to remove extra spaces from Data Matrix Label?

    Hi All,
    Kindly let me know how we can remove extra spaces from Data Matrix Label.
    Suppose we have this following code in SO10.
    ^FO1380,1879^COY,78^BY4^BXR,6,200^FH^FD[)>_1E06_1DF01001T_1D6JUN&v_huf&&v_hul&_1DV&v_supnum1&_1D16K&v_del&_1D6D&v_flddat1&095_1D2L&v_unload&_1D
    P&v_article&_1D4L&v_madein&_1D_1E_04^FS.
    Variable have there own value. and the desired result will be shown like the attachment.
    But in my code it splits into new line when CMIR value has 3 spaces.
    If CMIR value is 1S0 820 355 A . then it creats a new line.
    Kindly suggest me any possible solution.
    Thanks,
    Partha

    Hi Gaurav,
    In print preview we can't see any space or new line. But when it scanned by TSB (barcode scanner) it will generate a new line when there is 3 space CMIR value.
    So where should I write SHIFT CMIR LEFT DELETING LEADING space this code?
    Because there is no space coming at the time of debugging or print preview.
    And in SO10 the code written as
    ^FO1380,1879^BY4^BXR,6,200^FH^FD[)>
    Here CMIR value is 1SO 820 303 A
    and generated output is like this.
    And desired output should be like this.

  • How to remove extra spaces in a xml formatted string

    Hi,
    I am trying to remove extra spaces between the xml tags. For
    example, if a string is something like
    ' <header 1> <header 2> test </header 2> </header1>'
    I want to get rid of the spaces only between the closing tag of header 1 and opening tag of header 2 and closing tag of header 2 and opening tag of header 1, in short ,I want to remove the extra spaces between the tags if there are no other characters between them. I do not want the remove the spaces between closing tag header 2 and opening tag of header ,as there is occurence of other characters.
    I am aware that this can be done by looping through the string and using instr to identify the characters '<' and '>', but I would like to use it as a last resort only.
    Can anyone suggest me a better way of doing it in a single go by manipulating the data?
    Any help is really appreciated.
    Regards,
    Anil.

    You can use the replace function. If you only expect one extra space, then:
    scott@ORA92> select replace ('<header 1> <header 2> test </header 2> </header1>',
    2      '><', '><')
    3 from dual
    4 /
    REPLACE('<HEADER1><HEADER2>TEST</HEADER2></HEADER
    <header 1> <header 2> test </header 2> </header1>
    If you expect more extra spaces, then you will need to wrap another replace function around it for each space, for example the following will eliminate up to three spaces:
    scott@ORA92> select replace (replace (replace ('<header 1> <header 2> test </header 2> </header1>',
    2      '>     <', '><'), '>     <', '><'), '> <', '><')
    3 from dual
    4 /
    REPLACE(REPLACE(REPLACE('<HEADER1><HEADER2>TEST
    <header 1><header 2> test </header 2></header1>

  • How long takes extra space bought to appear in your iCloud account?

    Just bought extra 10gb of storage @£14 but can't see it available yet , how long does it take to be available?

    It should happen automatically but sometimes there's a delay in the purchase going through.  Also, there's probably so many people doing the same thing right now that the servers are behind in processing it.

  • How to create extra space?

    Hi,
    DATA v_tmp(18) TYPE c.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    EXPORTING
    input = wa_sales-matnr
    IMPORTING
    output = v_tmp.
    CONCATENATE v_tmp 'XXX' INTO PO_OBJ.
    The answer that I get is this - "X7000114BLCKXXX" the spaces beteeen the MATNR and XXX is not there. How could I get like this - "X7000114BLCK      XXX". The MATNR is made out of 18 characters. This 18 characters should be maintained in MATNR.
    Please help me.
    Thanks,
    Kishan

    You can also try,
    unpack wa_sales-matnr into v_temp.
    concatenate v_temp 'xxx' into po_obj separated by space.
    Hope this helps.
    The above logic will work fine if the matnr has all numeric values.
    You can try this generic logic in all cases
    1.Use shift statement and delete trailing spaces.
    shift tmp right deleting trailing space.
    2.fill the spaces with '0' using overlay statement
    overlay tmp with '00000000000000000000000' only space.
    3. Now you can use concatenate statement using space option.
    This is working fine in my syatem.
    Message was edited by: Imtiaz Ahmed

  • Stripping extra white space from a string

    I am trying to strip extra spaces from a string, so it there are 2 or more spaces between a word I want to remove all but one. I am trying the following code
    getStringTwo().replaceAll("/\s+/is","");
    but all I get is an error saying Invalid escape sequence
    Thanks
    G

    >
    This strips out all the whitespace. I ended up
    getting round it by walking through the string and
    checking the values of each char and comparing that
    to the next value. What a wast of effortt A small modification of my earlier post gives -
    public class Test040320a
        public static void main(String[] args)
            String str = "this    is       a \t test";
            str = str.replaceAll("\\s+"," ");
            System.out.println(str);
    }

  • Remove extra space

    Hi master,
    how to remove extra space from the tables and columns
    thanks

    Apparently table and/or column names that have been created don't match those being used in queries.
    This typically happens when you use tools that generate scripts with object (table/column) names in "double-quotes" thus causing them to be CaSe-SeNsItIvE to Oracle.
    See this short demo of sensitive object names :
    SQL> create table "My Table"  (col_1 varchar2(5));  -- Sensitive Name used
    Table created.
    SQL> desc my table 
    Usage: DESCRIBE [schema.]object[@db_link]  -- cannot find an object by the name "my table"
    SQL> desc "My Table"  -- I must explicitly use the Sensitive Name now !!!!
    Name                                                                     Null?    Type
    COL_1                                                                             VARCHAR2(5)
    SQL> desc "MY TABLE"  -- The name does not map across CASE either !
    ERROR:
    ORA-04043: object "MY TABLE" does not exist
    SQL> create table MY TABLE (col_1 varchar2(15));  -- Normally, object names cannot contain spaces !
    create table MY TABLE (col_1 varchar2(15))
    ERROR at line 1:
    ORA-00922: missing or invalid option
    SQL> create table MY_TABLE (col_1 varchar2(15));  --- this is the correct way to name an object.  DON'T USE "double-quotes" ; DON'T USE SPACEs
    Table created.
    SQL> desc MY_TABLE  -- the properly named
    Name                                                                     Null?    Type
    COL_1                                                                             VARCHAR2(15)
    SQL> desc "My Table"  -- the first , Sensitive name
    Name                                                                     Null?    Type
    COL_1                                                                             VARCHAR2(5)
    SQL>Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • How do you remove the extra space from the top margin when printing from a website? Already reset Firefox and checked my settings. Using Firefox 18 & Windows 8

    I have a 2" space at the top of pages that I print from websites. How do I remove the extra space? My margin settings are at .5"

    laderamacguy took a look at it and added a black shape over the tab. he suggested i use a different template next time, such as the black template.

  • How do I remove extra space after an image in an ePub created with InDesign?

    I've designed more than a dozen ebooks with InDesign and have recently been having problems with the spacing after images, both images that are anchored in the text or stand-alone and exported through the Articles Panel. Following are a few details:
    • In the Object Export Settings, I have the vertical spacing set to 0 both before and after the images and no breaks added.
    • In the Export panel, I do not have any vertical spacing applied to images.
    • I do not have any Object Style settings applied.
    • It doesn't seem to matter if I anchor the image into the text or have it as a stand-alone image in the Articles Panel with the caption after it in a separate text box, also in the Articles Panel.
    • I broke down the ePub into an html file and did not see any div or span classes that were different between images that are showing correctly vs. incorrectly.
    • Extra space appears in both iBooks on my computer, as well as on my iPad.
    • I converted to a mobi file for the Kindle and the space wasn't there.
    See attached screen shot. There shouldn't be that big gap between the image and the orange caption.
    Any help or suggestions anyone can provide would be greatly appreciated. I feel like I've tried everything I can think of with the same results over and over!

    Yes. That is the technique I traditionally use to drop an image into text. I even cut and pasted again as you suggested with the same result. Trust me, this is driving me nuts. I'm not doing anything different than before, but my results are different, even within the same document. I'll attach a few examples, all from this same document.
    How the space after my in-line image is supposed to look:
    And then a few of the pages with the mystery gap:

  • Spry Validation, how to strip spaces from end

    I have a form that is using Spry Validation. I'm validating onBlur and the field is required.  Everything works great, except if a user accidentally types a space at the end of their entry.  for example, they enter an e-mail address and put a space at the end - it will tell them it's not valid.  How can I strip the spaces?  Is it possible using the onBlur?

    Still having some trouble figuring this out.  Now it's not accepting a valid e-mail (even w/o spaces entered at the end)?
    <script type="text/javascript">
    function validateNoSpaces(value) {
      return /^[a-zA-Z]+$/.test(value)
    </script>
    var sprytextfield4 = new Spry.Widget.ValidationTextField("spryEmail", "email", {validation:validateNoSpaces, validateOn:["blur"]});
    Thanks,
    Jane

  • How do I remove the extra space when I manually changed a component ?

    Hi,
    I have changed a , lets say 10cm² component to 2cm² component by hand. Now I am stuck with some 8cm² extra space where I can not place any other component in.
    I know I have changed it in the passed but I can't figure out how I did it.
    Any suggestions?
    Regards,
    Stieve

    Hello Stieve,
    Can you share an example of what you did?
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • How do i remove extra space in word program?

    Recently I have typed typed an apostrophe in word program & it adds an extra space.  How do i get rid of that?  I have tried everything.  It is everytime I type a word with an apostrophe  Thank you

    Yes. That is the technique I traditionally use to drop an image into text. I even cut and pasted again as you suggested with the same result. Trust me, this is driving me nuts. I'm not doing anything different than before, but my results are different, even within the same document. I'll attach a few examples, all from this same document.
    How the space after my in-line image is supposed to look:
    And then a few of the pages with the mystery gap:

  • How to add extra blank space in xml

    I open the xml file in notepad I get this
    <XXON_EXT_BANK_ACCOUNT_NAME>創名聯合會計師事務所                                        </XXON_EXT_BANK_ACCOUNT_NAME>
    But when I open the xml file in html format the blank space is gone.
    How can I add extra blank space in xml?

    Hi
    Why do you need the extra space for?
    This difference in display that you see between your browser and notepad/notepad++
    will not affect your generated report.
    Bogdan 

  • IPhoto DVD Burn, How much extra space is needed?

    I did a few tests, and each time, I found the same result.
    If I filled a disc (DVD or CD) to nearly capacity, iPhoto couldn't burn the disc, saying that there was an error. When I burn a 4.7 gig DVD to 4.0 gigs, the disc burns successfully. How much 'extra' space do I need to leave for iPhoto to burn correctly?
    TIA

    Benson:
    Welcome to the Apple Discussions. What you're running into it the disparity between what iPhoto reports as the size of the select photos and what it needs to burn an iPhoto disk. As you know there's a big difference. Check the iPhoto Library folder size in the Finder and compare that to what iPhoto indicates when you click on the main library icon. The difference will be all the thumbnails, original files, modified files, data and database files. My test library is 74 via iPhoto and 98MB via the finder. That's a lot of overhead.
    I guess I would keep the iPhoto reported size to about 4.2G max. when burning to a DVD disk. Of course it would vary depending on the number of edited photos are in the batch you selected.

  • How much extra space does time machine need to backup a 512gig drive?

    ... in practice, how big does my backup drive need to be for 512gig primary drive?
    I know time machine does "snap shots". I can imagine this takes extra space over and above 512gig.
    What's your experience here?
    Thanks

    Web Wizard wrote:
    Any other solutions to this quandary?
    Yes, go with a smaller drive and be content to have oldest backups deleted more often.
    If you don't need hourly backups, you can get a smaller disk and clone with SuperDuper or CarbonCopy Cloner. You can schedule a backup nightly, if that enough.
    The advantage of having a clone is that it is bootable in case you run into trouble on your internal, you can boot from the external and keep right on working until you have the time to fix it. You can also run repair programs from that disk.
    -mj

Maybe you are looking for