Removing Commas and Spaces from Field

I have a table called TableD1 in a database with a field called "Range".
The ranges are like 1-1000; 1001-2000; etc. up to like 1000000-200000.
That is how they are supposed to look, they are not numeric fields, just general, containing a low, a dash and a high all in the same field.
I just discovered that quite a few of the entries have included commas and spaces, like 1-1,000 or 100000 - 200000.
I need to write a Query that will remove all of the commas from the data in TableD1's "Range" field, then all of the spaces.
I imagine they are some kind of Update statements but because of the potential to blow up the whole thing, I'm reluctant to experiment.
Does anyone know what code I should use?
Thank you in advance for any help.
Gee

Making sure you've taken a backup. Pull the data into temp table and do the testing. once you satisfied with the output then do the update on the main table.
create table #temp
Range varchar(100)
insert into #temp values('1-1,000'),('100000 - 200000')
select replace(replace(Range,',',''),' ','') from #temp
--update #temp set Range=replace(replace(Range,',',''),' ','')
Validate the the output of the select statement.
--Prashanth

Similar Messages

  • How do I remove the white space from the bottom and side of my document?

    How do I remove the white space from the bottom and side of my document? (I'm not talking about printing, just viewing it on the screen.) There are about 6 inches of white space at the bottom and at the right hand side. I don't like this. On a blank new spreadsheet it's triple that amount of white space.

    The infinite canvas convention doesn't make a lot of sense for Numbers. When I'm viewing a spreadsheet and mistakenly scroll into white, empty space I think, "this is ridiculous - all of my content is fits on one screen. there's nothing over there."
    A (relatively) infinite canvas is logical for Microsft Excel because it's one big table. There are 256(?) columns by default and hundreds of rows on a sheet - there are cells outside what a user is looking at to see. However, when viewing a Numbers spreadsheet with a single 10 column 10 row table that fits on the screen, there's nothing else on it to scroll to.
    Numbers should distinguish between viewing a spreadsheet and editing one. When I'm just viewing, when there's no content outside the window it shouldn't scroll there. This window behavior is beyond annoying for Numbers on my iPad and iPhone.
    (Adding user-defined canvas size setting to my view mode / edit mode thinking would probably be the most complete solution to this now that I think about it.)
    Until now the way scrolling worked in Numbers has defied logic. Actually it still does lol. That said, thank you Yellowbox for providing a clear explanation. Much appreciated.

  • Removing time and date from lock screen

    how do i remove time and date from lock screen?

    LarryE wrote:
    As noted in the title, I would like to know if it is possible to remove the Time, Day and Date from my custom Lock Screen?  Is it possible or not? 
    Not a feature of Windows Phone OS, you can only change wallpaper, show artist when playing music or have password request upon lockscreen.
    Happy to have helped forum with a Support Ratio = 42.5

  • Want to remove PFCG and SU01 from profile S_A.SYSTEM

    Hi,
      I want to remove PFCG and SU01 from profile S_A.SYSTEM.
    Could you please suggest me ways to achieve that.
    Thanks,
    Barada

    1) Create a role by inserting the profile S_A.SYSTEM and then design your S_TCODE such that you enter tcodes in ranges and exclude the tcodes PFCG and SU01 from the range.
    or
    2) Try deactivating the objects S_USER* this might definitely remove authroization for SU01 and not allow to execute the tcode. I am not so sure if it will restrict PFCG execution.

  • I cannot remove albums and playlists from my iPhone; I deselect them in iTunes, but they remain.  I can add new albums and playlists

    I cannot remove albums and playlists from my iPhone; I deselect them in iTunes, but they remain.  I can add new albums and playlists

    How did the photos/albums get onto the phone ?
    Only photos taken with the iPhone or saved from emails/websites etc can be deleted directly on the phone - either via the trashcan icon at the bottom right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it top right in thumbnail view. Albums that you've created directly on the phone can be deleted via the Edit button at the top right of the album selection screen.
    Photos/albums that were synced from your computer are deleted by moving/removing/de-selecting them from where they were synced from on your computer and then re-syncing

  • I have a MacBook that had Mcafee on it and went to great lengths to get it off.  Unfortunately after running all the remove scripts and support from mcafee, in my console it still shows com.apple.launchd{1} with message (com.mcafee.virusscan.VshieldEPoint

    I have a MacBook that had Mcafee on it and went to great lengths to get it off.  Unfortunately after running all the remove scripts and support from mcafee, in my console it still shows com.apple.launchd{1} with message (com.mcafee.virusscan.VshieldEPointInterface[7881]) Exeted with exit code:1  Then the next line says will start in 10 seconds and it repeats endlessly.

    Hi there,
    You're running an old version of Safari. Before troubleshooting, try updating it to the latest version: 6.0. You can do this by clicking the Apple logo in the top left, then clicking Software update.
    You can also update to the latest version of OS X, 10.8 Mountain Lion, from the Mac App Store for $19.99, which will automatically install Safari 6 as well, but this isn't essential, only reccomended.
    Thanks, let me know if the update helps,
    Nathan

  • Removing spaces from field names?

    Hi. I'm using Acrobat 9.3.3.
    I use the Form Wizard to create... forms. And a lot of these forms I need to have it do some math calculations -- sums, products, etc. But when I use the Wizard, it auto-creates field names with spaces in them. And (I don't know if this is normal), when I create formulas, notations, scripts, if it's trying to pull from a field with a space in the name it doesn't work.
    I have to go in and manually take out the spaces from all the field names... and there can be a lot of fields!
    Is there some process I'm not seeing, or some way to configure the Wizard, to remove/prevent spaces in the field names?
    Thanks for any info!
    Liam

    I don't believe it is possible.

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

  • Want to remove music and pictures from an older ipad so have space to update to ios7

    I have a new iPad Air and want to delete all music and pictures from the older ipad3 to make space not to download ios7 how can I do this with iTunes in PC windows?

    Manage the content via iTunes on the computer the same way it was put on the device.
    Details about using the device can be found in the User's Guide.

  • Delete L.H.S spaces from field in database table but not for Report

    Dear Experts
    I m facing a problem...actaually i have replaced 999 by blank in a field of database table record.
    Like :     999 abcde
                 999999 hjklmn
                 9999 klplmj
                 99999 hjsfhh
    I have replaced 9 by blank. and using CONDENSE statement i have avoid the left hand side spaces of 9 in the database table.
    Means the data is updated in database table following below using Condense.
    Like:     abcde
                hjklmn
                klplmj
                hjsfhh
    Now,  the problem is that these spaces is showing in the Report. The left hand side spaces is not deleting from the Report. But these spaces is not showing in the databse table.
    Plz tell me wat is the reason and wat is the solution to avoid these space from the Report.
    Note: That field is Character Field.   KNA1-STRAS
    Thanks and Regards,
    Swapnika

    Hello
    Try to use
    SHIFT c LEFT  DELETING LEADING SPACE.
    instead of
    CONDENSE...

  • Reduce field size and space between fields

    Is there any trick to reduce the size of a field more than "normal" and the space between fields?
    I'm creating a form that looks like at table of 5 rows and 8 columns.
    Some of the fields is with list function, and they in special take more space than other fields.
    When changing the form layout in the web browser I could move the "listfields" to different places and suddenly I can for example reduce them from 124 to 114 that is the smallest I have seen them. Also if try to reduce the same field later it just pops up from 114 to 139.
    The space between fields is also annoying large when I try to keep this form as small as possible.
    Why am I asking for this?
    I know I can increase the size of the form, but I want it as small as possible for the smartphones.
    The "listfields only contains number from 1 to 9, so they can be very small.

    Hi,
    We currently have minimum widths defined for each field type. It shouldn't be possible to reduce the size of a field below that minimum width. If possible, could you please share your form with me ([email protected]) to allow me to investigate the behavior that you are seeing with your "listfields"? Also, could you describe how you were moving fields when you saw the field width reduce from 124px to 114px?
    Instructions for sharing a form can be found here - http://forums.adobe.com/docs/DOC-2462.
    Currently the spacing between fields cannot be modified.
    Regards,
    Brian

  • How to remove Header and Footer from Flat File

    Hi,
    In a scenario , we are going to recieve a flat file which will contains header , footer and data. We have to have to load data in Oracle tables and remove header and footer.
    once the data load is complete , we have to delete flat file from source directory.
    Please help me in solving this issue.
    Thanks,
    Kamlesh

    You have a header parameter in the file datastore. You can provide any number to skip rows from top of the file. For footer you can create a filter in staging area.
    Filter coould be something like this.
    where source_alias.source_column not like '%FOOTER_OR_ANY_VALUE_AS_PER_YOUR_REQ'

  • Remove Header and footer from Word Docs

    Is it possible to remove the header/footer from Word docs?
    The html output from ctx_doc.markup gets the header/footer and (specialy)page numbers all messed up.
    []'s
    thanks

    Please define 'messed up'. I'll reproduce here and then try to find a cause/solution. I checked a couple of other forums and Metalink with no good discussion on the topic.
    -Ron

  • Remove header and footer from blank left-hand pages

    Are there any scripts to automatically remove header and footer on a blank left-hand page for an InDesign CS3 document? I have a book with many chapters and it would be more efficient than removing them by hand.

    It's a one liner from a much longer script that does quite something else -- this is merely a side effect, a quick way to get a page range (i.e., I need the range "251-256" to appear on my first page, excluding an optional blank last one) [*].
    Perhaps I could write a full script, but for that I need a bit more information. Is your document an InDesign Book, with each chapter in a separate document? If so, any empty frame on a last leftmost page can safely be deleted. If your book is in a *single* InDesign document, this line can only be used if a left hand page has *no objects at all* -- not even an empty frame. That's the easy case -- in English "if there are no objects on the page, apply the "[None]" master. If there *is* a frame, however, it cannot be removed right away, even if it seems empty. That's because in that case you probably have inserted a page break somewhere on the previous page, and if the frame is deleted, tht page break will push off the text on the *next* page (the right hand). It also depends on what kind of page break -- as a character or as a paragraph Keep Option; Next Page, Next Frame, Next Odd Page, Next Column. Way too complicated to script right off the bat.
    All in all, applying that empty master maually is much easier :-)
    [*] Sure, I know how to use the Next Page Number trick. However, I also need the range in my XML output, and the Page Number markers do not play nice when written out in ASCII.

  • How to remove extra blank spaces from log file.

    i have created a log file which contain the logs of a program. the logs are getting created fine for the first execution of the program but from the second time the log file is getting blank space's after every character.
    i have used the code to append the text in log files few examples : 
     'Clean up process started....' >> $log
    File name :'+ $files +'Time-Stamp: '+ $endtime +'Search complete.' >> $log 
    .i want to remove the extra spaces after each character but not all the spaces from the file. Thanks in advance.

    hi  mjolinor
    add-content is used to insert text it does not append text at the file .i used >> to append the text on log file ..
    from 
    Get-Help ADd-Content
    Synopsis
    Appends content, such as words or data, to a file.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

Maybe you are looking for

  • Can't get adobe reader to install on my new laptop with windows 8

    I can't get adobe reader to install onto my new laptop with windows 8. Basically what happens is that I start the download from the adobe screen by clicking the yellow download button, then I click run (I've also tried save and run), then I allow the

  • Microphone

    I would like to experient with dictation on this mini.  It's a mid-2010 Mini (2.4 GHz Intel Core 2 Duo).  Somewhere in storage I have an old microphone left over from a previous computer, most likely the IIsi.   I tried plugging that microphone into

  • Change of page layout settings in bsp

    HI Gurus, i am working on customizing a weblayout for objective settings&appraisals(ecc6.0). I have defined the classes and methods in bsp applications. I need to customize the page layout and split the frame work of the layout into header and detail

  • 802.1X Port Authentication\ACS Question

    Hello, I"m troubleshooting a 3560 port authentication issue. From what I was told from other members of my team when we upgraded to windows 7 at this site authentication no longer works. I compared an old config to a recent one and noticed there was

  • Account assignment in reservation.

    Can we have account assignment both at header and item level? if so where can i make the relevant change in customizing? Also is it possible to change the requirement quantity per item for a manually created reservation once it is posted ? Awaiting y