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:
Champ
insert 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
Similar Messages
-
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)SIMHi,
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. -
How to insert & # special characters into oracle table?
I have a text value which contains special characters such as & and #.
After I pass from one page to another,
TEST& becomes "TEST&"
I put " " on the above test, otherwise amp; will be truncated by OTN).
TEST# becomes TEST (# is truncated).
Actually the value is saved in table like this: "TEST&"
How to solve this problem?
How to insert & into table without &
Thank you.
Edited by: user628655 on Jul 27, 2009 9:47 AM
Edited by: user628655 on Jul 27, 2009 9:49 AM
Edited by: user628655 on Jul 27, 2009 10:39 AMAvoid doing that through a link. If this is a page item then submit the page and redirect to the target page using a branching. On the target page, create a computation to compute the target item using the original page item as the source. If you are talking about a report, use the id to pass through the link and fetch the text column in an on load computation.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------ -
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 remove special characters in a particular column
Hello,
i have a csv feed and i load it into a sql table (the sql table has all varchar data type fields)
feed data looks like (just sampled 2 rows but my file has thousands of like this)
"K" "AIF" "AMERICAN IND FORCE" "FRI" "EXAMP" "133" "DISPLAY" "505250" "MEDIA INC." 03/01/10" "INV31202" ".00" ".00" "0.00" "ALLO" ;
"K" "AIF" "AMERICAN IND FORCE" "THU" "TRTH" "123" "MUN MARCH 2010" "505099" "SOCIALTYZE" "03/01/10" "1308" "40,282.32" "40,282.32" "45564.64" "DIS" ;
some times i got some special characters in my table column (example: in my invoice no column some time i do have # or ! kind of invalid characters ) so how can i remove some kind of special characters in my column
once it is eliminated then i can write it to new table (with correct data format such as integer)
could some one please tell me how can i remove special character in a column of particular table
thanks in advance
asitaRemoves 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 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 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 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 find Transaction for a Known Table maintenance View
Hello Friends,
May I know how to find transaction for a known table maintenance View.
Thanks,
Best Regards,
Sudhanshu GargGoto SE16 Transaction and enter TSTCP Table
Here PARAM = /SM30 VIEWNAME=Table name*;UPDATE=X;
enter table name in bold.
Thanks
Seshu -
How to find the list of existing tables in a schema using DB link?
Hi
I know how to find the list of existing tables in a schema using the following query
SQL> select * from tab;
but, how to list the tables using a DB link?
For Example
SQL> select * from tab@dblink_name;
why this doesn't work?
Pl advice me
Thanks
Reddy.ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link? -
How to find out the Non Partitioned Tables used 2Gb on oracle
Hi team
how to find out the Non Partitioned Tables used > 2Gb on oracle where not is sys & system
regardsheres 1 I made earlier
set pagesize 999
set linesize 132
col owner format a25
col segment_name format a60
select owner,segment_name,segment_type,(bytes/1024/1024)"MB size"
from dba_segments
where owner not in ('SYS','SYSTEM','XDB','MDSYS','SYSMAN') -- edit for taste
and segment_type = 'TABLE'
having (bytes/1024/1024) > 2000
group by bytes, segment_Type, segment_name, owner
order by 4 asc -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
How to find latest entry in the table according to time
how to find latest entry in the table according to the time
is there any function module to do so
\[removed by moderator\]
Regards
Shashi
Edited by: Jan Stallkamp on Aug 25, 2008 4:39 PMHi,
If you want to read the entry from an internal table,
sort the internal table in the descending order by the time and
delete adjacent duplicates by comparing the fields other than time and the internal table will have the latest record.
Suggestion: instead of only time try to have one more field called date with the time combination
Regards,
Ramesh -
How to find function module's and tables used for the particulat screen or TCODE?
Hello Nation,
I would like to know how to find the function modules and tables used for the particular screen or TCODE or program.
Example : I would like know the function module used in the program RDBGFT?
How can i find that?
Thanks in advance ,Awaiting your reply.Make use of Find function with the keyword "CALL FUNCTION".
Make use of the same find function with the keyword "Select" to know the database tables used.
Regards,
Philip. -
How to find global index in partition table
Hi guys ,
need one help
How to find global index on partition table
How to find local index on partition table
Need query
Thanks in advance
Edited by: nav on Feb 17, 2012 6:51 AMnav wrote:
Hi Solomon,
so I have to identify partition & index are created or not,
also I have check the status of index ( both global and local)So what's the problem? Table/index partition is an object, so you can query DBA_OBJECTS:
SELECT SUBOBJECT_NAME,
CREATED
FROM DBA_OBJECTS
WHERE OWNER = partitioned-table-owner
AND OBJECT_NAME = partitioned-table-name
AND CREATED >= TRUNC(SYSDATE)
/This will give you partitions created today. So if you run this right after your job (I hope your job doen't run too close to midnight), you'll get table partition name your job created. Same logic can be applied to indexes.
SY.
Maybe you are looking for
-
White Screen computer hard restart
I have been having this problem for some time ( I have been with apple since the Apple 2) and I have not been able to figure out what is the problem. I have put in new ram (then took it out and put the old one back in to test it) I have reset pram.
-
Adobe Access plug in for Internet Explorer 10 on Windows 8
Is Adobe Flash Access (DRM) built into Internet Explorer 10 on Windows 8? If so, what is the best way to remove the Flash Access DRM plugin on Windows 8 (using IE 10)? In the past, I would have just removed the NativeCache and APSPrivateData2 folders
-
I get a black frame at the head using image sequence every time
I am using tif frames number 1-xxxxxxxx and each conversion adds black frames to the Qtime movies when there are none in any of my sequences.
-
Hi We have Oracle ERP R12.0.6 running on single node configuration. Usually we take full offline backups on friday morning. Even after issuing the command > shutdown immediate, database did not shutdown for 2 hours as some 'Create accounting' concurr
-
Office 365 password expiration notification per email?
As far as I know, users of Office 365 are informed about upcoming password expiration via popup when being online. Our users do not stay online the whole time but randomly connect to and are complaining now, that they are not being notified about the