Remove spaces from a field
i have a field in a table that stores the email address; this field is manually populated, so almost anything can be put into it; the field is 100 characters long;
one one particular record, someone entered:
"[email protected] [email protected]" into the email address; yes, that is the email address, some spaces and then the email address again;
i have a select statement that gets the first 50 characters of the email address -- "select substr(email_addr,1,50) from employee;"
so what i'm getting is "[email protected] johnathan.washingto", when all i want is "[email protected]";
So what function or trick can i use to get all characters in the email address up to but not including the first space? I thought translate or decode could do it, but i haven't figured it out yet.
This forum is for using the "SQL Developer" tool rather than general SQL questions (which is what the "SQL and PL/SQL" forum is for). However, to get what you want, try:
select decode(instr(email_addr, ' '), 0, email_addr, substr(email_addr, 1, instr(email_addr, ' ') - 1)) from employee;
This should work for both where there is a space and where there isn't a space.
theFurryOne
Similar Messages
-
HT201364 how do i remove space from my start up disk
How do i remove space from my start up disk?
Do you mean "make" space on your HD?
Freeing Up Space on The Hard Drive
1. See Lion/Mountain Lion/Mavericks' Storage Display.
2. You can remove data from your Home folder except for the /Home/Library/ folder.
3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
4. Also see Freeing space on your Mac OS X startup disk.
5. See Where did my Disk Space go?.
6. See The Storage Display.
You must Empty the Trash in order to recover the space they occupied on the hard drive.
You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located. -
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!
LiamI don't believe it is possible.
-
New to MSSQL - need help with a query to remove spaces within a field
After data conversion the leading and trailing spaces were removed from the data in the "tag" column. However spaces in the middle of the column were not removed. Tag data must be unique. When I run an update script I get the
message that "Cannot insert duplicate key in object 'mytablename'. This tells me that my data looks like this:
AAAAA[space][space]BBBBB --unique tag
AAAAA[space]BBBBB -- unique tag
If I remove the spaces from each I will have duplicates. Therefore I'd like to update the records as follows:
AAAAABBBBB --unique tag
DUP-AAAAABBBBB -- unique tag
How can I write a script that not only removes the spaces but also identifies the duplicate record?Hello,
You can use the logic below. This would prefix DUP-n where n would be 1 to total number of duplicates values. This is just in case if you have more than one duplicate records.
create table #duptest (TestData varchar(800), constraint p unique( TestData))
insert #duptest (TestData) values ('CCCC DDDDD'),('AAAAA BBBBB'),('CCCC DDDDD'),('AAAAA BBBBB'),('AAAAA BBBBB')
SELECT
testdata AS ExistingData,
ISNULL('DUP' + CONVERT(VARCHAR(10),NULLIF(ROW_NUMBER() OVER(PARTITION BY REPLACE(testdata,' ','') ORDER BY (SELECT NULL))-1,0))+'-','') + REPLACE(testdata,' ','') AS UniqueData
FROM #duptest
--sIbu -
How to remove space from a variable in a smartform
Hi,
I have a problem in displaying a variable in a smartform..The variable shows some blank space that preceeds the data.
for eg:,
variable = 18.000.
How to remove space before 18.000?To remove the decimal places for quantity and rate/quantity , use the syntax to restrict the number of digits after decimal places. The syntax is
&symbol(.N)&
where N is number of decimal places.
Since you dont want decimals use &symbol(.0)&
For the other case it depends on how the currency is represented , any way try using the syntex &symbol(T)&
Please give me reward point If it is useful
Thanks
Murali Poli -
Removing spaces from multiple files
I'm using iWeb to make a photogallery, and when i publish to my server on yahoo, it says there is an error. Now i've had tons of errors and problems with yahoo, and i've come to the conclusion that this problem is because the file names have spaces, and yahoo's servers don't like spaces. So, i was wondering how one would go about removing spaces in file names of multiple files in a folder.
Don't forget that this won't fix any links within the pages themselves.
If you have a link to "some page.html" and the script renames the file 'some_page.html', you'll need to manually update the links in the page to the new file name before the link will work. -
How to remove space between two fields in emergency primary contact.
How Can I remove a space between the two fields.IN emergency primary contact there are certain field called "C/O" and a i have added one text for this field inside that.But it is taking a big space between the "C/O" field and the text view.Plz suggest how I can re,move this?Also How Can I add new transparent container with the end user personalization in the emergency contact field.
Hi Peddi
In my structure pannel I have simpleSearchPanel below that only i have the two lov fields ex: emp_no and emp_name . how to set the spacer between this From which Region where can find the spacer bean what proerty do i need to set
Thanks
AT -
Need to remove space for a field when displayed in ALV Report
Hi,
I have material field of length 18, but the content is only 10 char. I need to remove the extra space when it is displayed on ALV Report.
Is there any option in ALV field catalogueuse statement condense.
condense zmatnr.
also giv output lenth of alv column as 10. -
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)" -
Need to trim space from time field
I've got a text box in my report where I am dropping in two times: start time and end time.
{EarlyShiftStart}-{LateShiftEnd}
My problem is if the late shift end is a time less than 10, it adds an extra space between the "-" and the start time.
So instead of:
8:00 AM-3:00PM
it is 8:00 AM- 3:00 PM.
Is there a way to have this extra or padded space removed?
Thanks,Hi,
What is the data type of your database fields for times?
If those are of type datetime, then you can use cStr(<your database field>, "hh:mm tt"), which will give you the time part as required by you and can try something like this:
cStr(<your database field for early shift time>, "hh:mm tt") & '-' & cStr(<your database field late shift time>, "hh:mm tt")
Thanks,
Raghavendra -
I can not remove spaces from TEXT file..
Hi All,
please advise me why the following code not remove the spaces or tab from the text file.
try
FileReader fr = new FileReader("D:\\Test\\a.txt");
BufferedReader br = new BufferedReader(fr);
Pattern p;
Matcher m;
String line;
String afterReplace = "";
String inputText = "";
while((line = br.readLine()) != null)
inputText = line;
p = Pattern.compile("\\s+|\t");
m = p.matcher(inputText);
System.out.println(afterReplace);
afterReplace = afterReplace + m.replaceAll(" ") + "\r\n";
System.out.println(afterReplace);
fr.close();
catch (Exception e){
System.err.println("Error: " + e.getMessage());
}my regards
Waelmany thanks for you , i try to used it for the following text but the results same.
McNair was shot and killed last weekend in what police say was a murder-suicide. (July 9) Nation / World By: AP
Comments: text ( 0 ) | video ( 0 ) + Add a comment
Be the first to add a comment .
1 2 3 4 5 Your Rating <br>
Popularity Your Name: Your Comment:
http://videos.kansascity.com/vmix_hosted_apps/p/media?id=4999903&item_index=&genre_id=00000840
Your Email: Friend's Email: Your Message:
Top Videos Nation / World
Sports Entertainment Business Lifestyle
Archive User Submitted Politics Ink Local
Selects
all Sort By: Most Recent Most Popular
Highest Rated Loading...
<br>
All users : If you have not already done so, Click "Record a Comment" to begin. Next, click "Allow" to use your camera.<br><br>
Additional Info for Mac users : If you do not see video (after clicking 'allow'), do the following:<br> Click on the blue "gear" icon in the lower right corner to bring up the settings window. Click on the webcam icon. If you are using a built in iSight camera,
choose USB Video Class Video from the pulldown menu. You should see video immediately.<br><br> Click "close" button.
Record! You must record at least ten seconds before
you can stop. -
GroupWise8 crashes when removing sender from "TO" field
Hi guys,
A user is having GroupWise crash when they go to remove a contact from the "To:" field while composing an email.
The Event viewer ID:1000 states: Faulting application name: grpwise.exe, version: 8.0.3.21995, time stamp: 0x4fda7d4c
Faulting module name: gwabu1.dll, version: 8.0.3.21995, time stamp: 0x4fda7938
Exception code: 0xc0000005
Fault offset: 0x0005eecb
Faulting process id: 0xa14
Faulting application start time: 0x01ce4fec1ff44bec
Faulting application path: C:\Program Files (x86)\Novell\GroupWise\grpwise.exe
Faulting module path: C:\Program Files (x86)\Novell\GroupWise\gwabu1.dll
Report Id: 01b72261-bbed-11e2-a47b-180373dcb5bf
Thanks!Hi
DEP and GroupWise do not play nicely together. I would recommend that you turn it off.
Cheers, -
my itunes shows 119 photos, 4.61 GB, but i have removed many and i only have 44 currently
how do i remove the space it thinks its taking up
thanxHello Linglane4,
You can use the following steps to delet photos from your Camera Roll:
To delete Camera Roll photos and videos from your device
There are two methods to delete items from the Camera Roll:
Import the Camera Roll to your computer and choose to delete items after import.
Delete photos and videos from your device manually:
Open the Photos application and open the Camera Roll.
Tap the Action button.
Tap each photo to select it.
Tap the Delete button.
Note: For photos and videos you want to save, import them to your computer before deleting them from the Camera Roll.
You can find the full article here:
iTunes: Syncing photos
http://support.apple.com/kb/HT4236
Thank you for using Apple Support Communities.
Best,
Sheila M. -
Permanently removing Yahoo from search field
Since the last upgrade I believe, I cannot remove the Yahoo search from my search field. Yes, I can temporarily remove it by selecting the manage search engines, but everytime I restart FF it reappears. Can you please tell me how to get rid of this forever! there is no Yahoo tool bar as many have suggested, just the search field. thank you kindly for any assistance. Someonezmom
See http://kb.mozillazine.org/Search_Bar#Removing_search_engines
-
I have a variable called 'enteredname':-
var enteredname:String;
When the user enters some text into my text input 'nameentry' and clicks a button the text entered is saved into this variable:-
enteredname = nameentry.text;
This variable is then sent to a server and set as the name of the item the user has added via http request however I want to add in another string variable 'enteredimagename' which will store the same text but will have any spaces removed or any characters that would not be appropriate to an image/jpeg file.
The idea of this is that the user adds a name for an item their adding and the same name gets applied both as the items title and as the items image filename (with all the spaces etc removed) as all of the images in my app are stored on a server and are dynamic so the click would look something like:-
enteredname = nameentry.text;
enteredimagename = nameentry.text (with some code to remove the spaces for this string or something)
Can anyone help me out with this?Hi use this function pass the name or any string that you want to remove strings..the function will return you the concatenated string without spaces.
private function stripSpaces():String
var strippedSpaces:String = StringUtil.trim(name);
var strArray:Array = strippedSpaces.split(" ");
var concatString:String = "";
for(var i:int=0;i<strArray.length;i++)
if(strArray[i] != " ")
concatString += strArray[i];
return concatString;
This function removes all spaces, also the spaces between words and at the beginning and end as well.
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari
Maybe you are looking for
-
How do I use one iTunes account with multiple macs?
I have a Mac mini and am getting a MacBook Pro. I want to use my iTunes library that currently resides on my mini on my MacBook as well without jacking up anything. I have an iPhone, an iPad Air and a classic iPod that are all sync'ed to the iTunes
-
Lion 10.7.2 VPN service not working
Hi, I have a clean installation of 10.7.2 on a Mac Pro which is not able to provide VPN service. Here's what is configured: *OD Master - users and groups in place *firewall active with allow rules for all necessary VPN ports (500, 1701, 4500) *port
-
Why won't my mid 07 iMac shut down?
My 07 keeps hanging up, won't restart or shut down without holding the power button down. I upgraded the ram, thought this would help, same outcome. Any ideas?
-
Hi everyone, I installed user profile service and synchronize. When I go to my site by administrator user every things is OK. But when I login by another user the my site is look like this Please guide me to resolve this problem. Thanks in advance.
-
What are the possible reasons why this R3 info not getting to BW?
Hi, I have data coming into BW from R3 a datasource DataSorce1; When it gets to BW, SalesOrg numbers 22941 and 22942 comes to BW without problem but 22943 which is a new config. In the R3 master data does not get to BW. 1. What are the possible ways