How to find Special Characters in a single query
Dear Experts,
Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
Thanks.
e.g.
A_MIR
A%SIM
A*SIM
A)SIM
Hi,
947459 wrote:
Dear Experts,
Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
Thanks.
e.g.
A_MIR
A%SIM
A*SIM
A)SIMIt's not clear what you want.
What are "special characters"? Can you list all of them?
Do you want to find rows where string_column contains any of the special characters? If so
SELECT string_column
FROM table_x
WHERE string_column != NVL ( TRANSLATE ( string_column
, 'A(%$*&@,;'/+-'
, 'A'
, 'A'
;I assume 'A' is not a special character.
You could also use regular expressions, but it will be more efficient if you don't use them unless you really need to.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
You'll get better replies sooner if you always include this information whenever you have a question.
Similar Messages
-
How to find Special Characters in a table ?
Hi,
I have a problem, during a data upload by the client, some special characters were uploaded in the database.
Sample data : " AC Power Cord Denmark "
I want to find all records containing such special characters and update them.
TOAD is able to display these characters but when i copy them onto the query... it doesnt work.
Can we know which encoding is that ? or do something to take care of this ?
Thanks in Advance.
Message was edited by:
Champinsert into t1 values ('joe$%"likes#$%#to*()ride%^$#his bike');
1 rows inserted
select * from t1;
C1
joe$%"likes#$%#to*()ride%^$#his bike
1 rows selected
select translate(c1,'!@#$%^&*()"',' ') from t1;
TRANSLATE(C1,'!@#$%^&*()"','')
joe likes to ride his bike
1 rows selected
update t1 set c1 = translate(c1,'!@#$%^&*()"',' ');
1 rows updated
select * from t1;
C1
joe likes to ride his bike
1 rows selectedI didn't notice your special special characters, but it still works:
insert into t1 values ('joe likes his'||chr(22));
select * from t1;
select translate(c1,chr(22),' ') from t1;
update t1 set c1 = translate(c1,chr(22),' ');
select * from t1;
Message was edited by:
JoeC -
How can I find special characters in a string
Hi,
I have a small task where I have to find special characters in a given string, Can anyone suggest.......................What is your definition of a "special character", could you be a bit more specific?
Do you simply want to find the position of a specific character in the string?
Can it occur more than once and you want to find all occurences?
What should happen if the special character does not exist?
For programming purposes, all 256 possible 8 bit characters (x00-xFF) can be treated the same. Non-printing characters can be entered in \-codes or hex display if needed.
LabVIEW Champion . Do more with less code and in less time . -
How to print Special Characters in Sap-Scripts
How to print Special Characters in Sap-Scripts
Thanks,
RaviHi
if u want print special characters we can use hot codes i.e ' ' (single inverted commas). in between these hot codes insert u r special characters.
write ' !@#$%^&*( ) '.
for the above write statement output is
output is !@#$%^&*( ) -
How to display special characters in Script...
hi all,
Can any one tell me how to display special characters in script...
how to write in text element
thanks in advance,
prashantHi Prashant ,
What special characters would you like to include .
There are a set of characters / icons /symbols that can be included in Script , for that open a window in edit mode and in the menu there will be an option called Insert , here you can find a lot of characters/symbols that can be included .
Regards,
Arun -
How to write special characters in PDF using iText
How to write special characters encoded with UTF-8 in PDF using iText.
Regards,
Pandharinath.I don't know what your problem is but that's almost certainly the wrong question to ask about it. Java (including iText) uses only Unicode characters. (You may consider some of them to be "special" if you like but Unicode doesn't.) And when it does that, they aren't encoded in UTF-8 or any other encoding.
So can you describe your problem? That question doesn't make sense. -
How to remove special characters while typing data in edit cell in datagrid in flex4
Hi Friends,
I am facing this problem "how to remove special characters while typing data in edit cell in datagrid in flex4".If know anyone please help in this
Thanks,
Anderson.Removes any characters from
@myString that do not meet the
provided criteria.
CREATE FUNCTION dbo.GetCharacters(@myString varchar(500), @validChars varchar(100))
RETURNS varchar(500) AS
BEGIN
While @myString like '%[^' + @validChars + ']%'
Select @myString = replace(@myString,substring(@myString,patindex('%[^' + @validChars + ']%',@myString),1),'')
Return @myString
END
Go
Declare @testStr varchar(1000),
@i int
Set @i = 1
while @i < 255
Select
@TestStr = isnull(@TestStr,'') + isnull(char(@i),''),
@i = @i + 1
Select @TestStr
Select dbo.GetCharacters(@TestStr,'a-z')
Select dbo.GetCharacters(@TestStr,'0-9')
Select dbo.GetCharacters(@TestStr,'0-9a-z')
Select dbo.GetCharacters(@TestStr,'02468bferlki')
perfect soluction -
How to insert multiple records in a single query
Dear all,
Can you please tell
how to insert multiple records in a single query ??INSERT INTO table_name (column_1, column_2) VALUES ('value_A', 'value_B')OR
INSERT INTO table_name
(column_1, column_2)
SELECT 'value_A', 'value_B' FROM DUAL
UNION ALL
SELECT 'value_C', 'value_D' FROM DUAL
;Edited by: Benton on Nov 9, 2010 1:59 PM -
How to find the processing time of any query?
im using oracle express edition, can anyone help me, how to find the processing time of any query?
Trace the query and tkprof the generated trace file.
http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/sqltrace.htm#PFGRF01010 -
How to enter Special Characters in JSP
Is there any way to enter special characters such as ºC ? i am using J2EE and Oracle 9 i.
When i try to enter 2ºC after updating the datbase it is converted to 2ºC. All special characters are prefixed with Â. Pls suggest some better way ..This normally relates to your unicode set you are using. For example the database is using a different way of storing data than how it's being parsed.
One quick/dirty fix is to save the data using HTML encoded elements, for example ©
You will also find that £ £ will cause problems. If your web app is only for one country then I would not worry about it however if you need multi language support then you need to read up a little
[Unicode Support|http://www.alanwood.net/unicode/] -
How to replace special characters in string.
Hello,
I want to replace special characters such as , or ; with any other character or " ".I find out there is no such function is java for this.There is only replace() but it accepts only chars.If anybody know how to do this?.
Thanks,Hello,
I want to replace special characters such as , or ;
with any other character or " ".I find out there is no
such function is java for this.There is only replace()
but it accepts only chars.If anybody know how to do
this?.
Thanks,Can't you just do the following?
public class Test
public static void main(String[] args)
String testString = "Hi, there?";
System.out.println(testString.replace(',',' '));
} -
Finding special characters in a columns using SQL
Hi,
I have a column (Object_Name) which accepts character values. I want to find out such kind of records which has special charaters in my columns Object_Name. Please let me know, how do I write SQL statement for the same.
Thanks for your time in advance.To find, for example, a comma in the OBJECT_NAME column try:
SELECT OBJECT_NAME
FROM MYTABLE
WHERE INSTR(OBJECT_NAME,',')>0;To find multiple special characters, for example @ # + - _ , . : ; at same time try:
SELECT OBJECT_NAME
FROM MYTABLE
WHERE INSTR(TRANSLATE(OBJECT_NAME,'@#+-_,.:;','@@@@@@@@@'),'@')>0;add a @ to the string '@@@@@@@@@' each time you add a character to the string '@#+-_,.:;'
max -
Finding special characters in a string
Hi all, I'm using Oracle 10g.
I have a column name with special characters. how can i replace the special characters in the column with space and no space depending on the special character. please see the example below. can i use REGEXP_REPLACE?
create table
create table sample_test (
Name VARCHAR2(20 BYTE))insert table
insert into sample_test values ('O''NEIL')
insert into sample_test values ('B.E.VICTOR')
insert into sample_test values ('WILLIAM,L')
insert into sample_test values ('MARY-ANNE')
insert into sample_test values ('VON_ANCKEN')
insert into sample_test values ('BROWN;L')i would like the output as follows
Special Character Name Expected Name Remarks
Single Quotes O'NEIL ONEIL Remove quotes and no space
Dot B.E.VICTOR B E VICTOR Replace with space
Comma WILLIAM,L WILLIAM L Replace with space
Hyphen MARY-ANNE MARY ANNE Replace with space
Underscore VON_ANCKEN VON ANCKEN Replace with space
Semi Colon BROWN;L BROWN L Replace with space Please advise.
Thanks
BobA simple solution without regexp usage:
-- Test Data
with sample_test as
select 'O''NEIL' name from dual union all
select 'B.E.VICTOR' name from dual union all
select'WILLIAM,L' name from dual union all
select'MARY-ANNE' name from dual union all
select'VON_ANCKEN' name from dual union all
select'BROWN;L' name from dual
-- Query:
select name old_name,
translate(replace(name,'''',''),'.,-_;',' ') new_name
from sample_test;Explanation:
REPLACE deletes the quote
TRANSLATE replaces dot, comma, hyphen, semicolon and underscore -
Finding special characters in the column
Hi,
Need a help to find out the special characters in the column. since the data is loaded from external files like excel etc.., there
are some special characters are got inserted in the column.
how do i find out the rows in the column which has special characters, Please help ASAP...
ThanksHi,
What do you mean by "special characters"?
SQL> With T As(Select 'A?BC' txt from dual union all
2 Select 'AB%C' txt from dual union all
3 Select 'ACAA' txt from dual)
4 Select txt from t where Regexp_Like(txt,'[[:punct:]]');
TXT
A?BC
AB%C
[:punct:] Punctuation symbols
% . , " ' ? ! : # $ & ( ) * ;
+ - / < > = @ [ ] \ ^ _ { } | ~
{code}
Regards,
Christian Balz -
How to add special characters in Flash CS3
Hi, i need the help of some flash guru… these last weeks we were working with cloversites.com to build a community website… the interface is awesome etc etc however we in Malta have eight special characters (GCZ with a dot on top of them and an H with a second strikethrough). Those at cloversites wrestled with the problem, they could see the characters on their computers but when they entered the text in the site, flash couldn't render the special characters. Here is their message:
I am extremely sorry about this, but we were unable to add in your characters. We attempted to add them into our software but they did not work. We worked on it all morning and realized that we need an extra add-on for our keyboards. Adding special characters is nothing new to us and have answered this request for many of our international users. For some reason, the Maltese characters did not work in our sites. For example, our "option-G" is the copyright symbol so it will need to be transferred over to international characters.
Unfortunately, we thing that this has to do with Adobe Flash CS3. The software allowed me to embed the characters, but we were unable to render them on the web. Which led us to think it had to do with the version Adobe is running and its inability to render the text through its software on the web. None of the characters worked on the web, and it looks like its just an Adobe bug. So we are able to type and use the Maltese characters, but Adobe Flash is having trouble with them.
Does anybody know of any possible solution?see if codepoints-to-string() is suitable for you ..
Re: how to concatenate hexadecimal value to string in XQuery in PS Message Flow
Maybe you are looking for
-
How can I get 2 different track from iTunes playing on 2 different stereos?
We are remodeling a part of our home and decided that this would be the time to install a whole house audio system. We would like to use our iTunes library as a source and be able to play different tracks in different parts of the house (also called
-
BUPA_MDM Business Object missing in EEWB in CRM 5.1
Hi All, do you know why business object BUPA_MDM for business partner sales area data extension is not available (in previous release yes). The value help doesn't find it when I create an extansion looking for "EEW Bus. Object". My CRM relese is CRM
-
How to install vmware player 5.0.2 on Elementary OS?
My system is running Elementary OS Luna which is based on Ubuntu 12.04 or Precise. I am running latest kernel 3.11 which was installed using .deb packages, packages were: linux-headers-3.11.0-031100-generic_3.11.0-031100.201309021735_amd64.deb linux-
-
hi all I have a problem in arabic language encoding when store data into database i wrote my problem here in this page http://www.010555555.com/Arabic/index.html so please contact me if you know the solution on [email protected] thanks alot all
-
Lumps on top of lid (screen)
I've noticed that my new MBP has three small lumps (or bumps) on the lid of the screen. Looking at the lid from the back...two are right at the bottom about 1" from both corners. The second is at the top about 1-2 inches from the left. You have to lo