Bunch of Oracle on the special characters in a string - translate?
How to remove special characters in a string, it can contain. , (space), etc.
SELECT TRANSLATE('123.456 (90-90)', '', '') FROM DUAL
Basically I want to undress and to compare with the db value.
WHERE TRANSLATE(TABLE.NUMCODE, '', '') = TRANSLATE('123.456 (90-90)', '', '')
Use TRANSLATE, since you're on 9i. For example:
TRANSLATE (your_string,'X,. #! % @$ ^ & * () _-+=', 'X')
Removes all the s characters in ', #! % @$ ^ & * () _-+=' of your_string.
SY.
Tags: Database
Similar Questions
-
where are the special characters in the new Pages?
where are the special characters in the new Pages?
Menubar pages: Edit: Emoji & symbols, or control-command + space combination. Same situation in other Apple applications. In addition, available as a menu item from the menu entry in the menu bar to the right, Finder.
-
Hello. Can he the word pdf conversion to retain the original character of the special characters of the algorithm? the formulas have special mathematical symbols. Conversion them kept?
The equations are a problem. If the equation is text, you can be lucky if you have the fonts on your system. Most of the time I have try, the fonts in the equation are garbage. Expect to have to retype the equations and some special characters. Much also depends on the existence of the fonts on your system. Just in my experience, the equations are almost impossible to convert.
-
How to limit the special characters for a specific column
Dear gurus,
I have a table with a field Champ_1 emp
in this particular Champ_1 is an address column where the data can be as ' 12 st first floor"but suppose by mistake the user has entered data as 12 st first floor & ' must be restricted (not using relaxation but can this be possible using constraints) so for this we can how to restrict the special characters only not to get entered in the column.
Kind regards
friendYes you can do it like this
SQL> create table t (field_1 varchar2(4000)); Table created. SQL> alter table t add constraint t_chk check(length(regexp_replace(field_1, '[[:alnum:]|[:space:]]'))=0); Table altered. SQL> insert into t (field_1) values ('12 st first floor'); 1 row created. SQL> insert into t (field_1) values ('12 st first floor & '); insert into t (field_1) values ('12 st first floor & ') * ERROR at line 1: ORA-02290: check constraint (ARBORU.T_CHK) violated SQL>
-
The special characters in Spanish - what do I need?
I use Photoshop 7 to create graphics for a series of training which is transposed in Spanish. I use the FCP 6.03 on a G5. What do need me Adobe to create graphics in Spanish? I have access to some of the special characters of the language using the Spanish keyboard - I can see a list of the characters, but how to use the IDs of the unicode characters in Photoshop to show special characters? I can go down the increase? and! and n tilde; accented vowels are not part of the key combinations.
Scroll down to Mac key combinations:
-
Find special characters in a string
Hi all, I am using Oracle 10 g.
I have a column name with special characters. How can I replace the special characters in the column with space and no space based on the special character. Please see the example below. can I use REGEXP_REPLACE?
create table
Insert a tablecreate table sample_test ( Name VARCHAR2(20 BYTE))
I would like the following outputinsert 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')
Please notify.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
Thank you
BobA simple solution without the use of regexp:
-- 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 point, comma, dash, semicolon and underscore -
How to find special characters in a string of give/sentance
Hi all
I have a task to complete with the time to give. Because I'm not very good in PL/SQL, I need you're help.
Condition is:
I must come with the SQL or PL/SQL code which should return and find the hidden or special character in the name of the data files in a database. There are nearly 400 + database are present in almost any flavor of UNIX, and I need to check the database each.
As you know, the name of the data file will be like this:
So, it should avoid these things and only discover the special characters in the name of the data file./u02/instance_name\oradata\datafile_01.dbf
Please keep in mind that... I'll be pulled the script Oracle the Oracle 9i client that will access all the databases of Oracle 9i to 11g in a short and give me the result.a-z , A-Z , 0-9 and \
Please help me to solve this problem and let me know if you need more information.Hello
Mukesh says:
Hi Frank,.It is an excellent service. Thanks for you response.
I want to change the query that... I should get only the name of these data files that are special characters of detention. I don't know how to put it in that condition. :(Here's one way:
SELECT file_name , ... -- other expressions, if you want any FROM dba_data_files WHERE TRANSLATE ( file_name , '?0123456789.ABCDEFGHIJKLMNOPQRSTUVWXYZ\_/abcdefghijklmnopqrstuvwxyz' , '?' ) IS NOT NULL
Among other expressions, you can put in the SELECT clause (if you wish) is a copy of the TRANSLATE function, you had in your message. That would underline exactly what characters rendering invalid file name.
-
Laptop keyboard just type the special characters (those of accented)
My Windows 7 laptop keyboard will only be the type of special characters (for example, accented letters) and no regular letters or symbols. Help please? Laptop is currently unusable because I'm unable to type. Have tried to use as well the built-in keyboard and a wireless and issues is both.
Well oddly enough it turns out be the key "Alt Gr". How have I never noticed that the key next to the space bar? ! He pressed a couple of times & everything back in order. Thanks to the OP, but because you had not mentioned it I would not have thought to try :)
-
Read the special characters from the txt file
Hi guys,.
on blackberry 9000, I tried to read some special characters like this: ° ²® µ±³ ° ¯´µ±´¯® text file
using this function:
FileConnection fc = (FileConnection) Connector.open ("file:///SDCard/test.txt", Connector.READ_WRITE);
InputStream is = fc.openInputStream ();
InputStreamReader reader = new InputStreamReader (is, "UTF - 8");
LineReader lineReader = new LineReader (is);
line & = new String (lineReader.readLine ());what I get is different, I can't write it here, it is difficult to find these characters.
I change the content of the file to:
ddfdsfdsfdsfdsfdsf
aaaaabbbc ° ² ° ¯´µ±´¯® µ±³®now I get:
ddfdsfdsfdsfdsfdsf
aaaaabbbc, then the same charactersHow to display the same as what I have in the text file?
Thank you
To add to what martijnbrinkers said, you need not to the InputStreamReader because you don't use it (and this is why your code has no idea that the file is in UTF-8 encoding).
-
Randomly generate the special characters
I want to generate random password which should include at least one special character that could be any special character except @. dbms_random. String ('p', 1) will give 1 printable character that could be all in uppercase or lowercase, or any numeric value too. But how can I generate just 1 special character (with the exception of the @)?
Thank you
Published by: user5406804 on November 4, 2009 05:50Hello
Welcome to the forum!
You can do something like this:
SELECT SUBSTR ( '!#$%^*:;,.' -- list all special characters here , dbms_random.value (1, 11) -- 11 = 1 + number of special characters , 1 ) AS special_char FROM scott.emp ;
-
How to avoid special characters in a string
Hai.
I want only Alphabets & numbers to appear on my channel. No other special characters except spaces. How can I do this?
Hi Alice,.
See the attached example.
It will be useful.
Mike
-
Treat the special characters.
What is the syntax to check whether a character is a special character?
... if(myCharacter.contents!=SpecialCharacters.INDENT_HERE_TAB)
{
.
.
.
}
the end of the paragraph is '\r '.
Substances
-
Replace special characters in a string
Let's say that someone copies the list as follows and the glue in a Javascript dialog box:
302304
305678
245675
How do I manipulate the string so that it reads:
302304 305678 245675
In other words, how to replace manual line breaks in a string with spaces?
Thank you!
It's the cleanest method that you are looking for:
/[\n\r]/
In this case, even a simple \s would work, but it's maybe not what the OP...
Substances
-
empty data file with special characters in the name
Hi all
I'm having a problem with an empty data file which is in recovery mode.
Before the following has been a success:
ALTER database create datafile 'fully_qualified_file_name' as 'fully_qualified_file_name ';
recover data file "fully_qualified_file_name";
ALTER database datafile 'fully_qualified_file_name' online;
But this time it does not work as I get an error:
ORA-01516: file nonexistent journal, data file, or temporary file
Using the file id does not work either.
When I created a record of control file I see the data file has special characters in the name:
' / oracle/PRD/112_64/dbs/PSPR3I ^? ^?'
Since it is empty, it would be possible to create the data file void anothr
using the:
ALTER database create datafile ' / oracle/PRD/112_64/dbs/PSPR3I ^? ^?'
as ' / oracle/PRD/spdata2/r3i_8/r3i.data8';
and then recover datafile 'fully_qualified_file_name ';
ALTER database datafile 'fully_qualified_file_name' online;
How orders oracle faced with special characters?
Thanks for your adviceuser6737818 wrote:
Hi allI'm having a problem with an empty data file which is in recovery mode.
Before the following has been a success:
ALTER database create datafile 'fully_qualified_file_name' as 'fully_qualified_file_name ';
recover data file "fully_qualified_file_name";
ALTER database datafile 'fully_qualified_file_name' online;But this time it does not work as I get an error:
ORA-01516: file nonexistent journal, data file, or temporary file
Using the file id does not work either.When I created a record of control file I see the data file has special characters in the name:
' / oracle/PRD/112_64/dbs/PSPR3I ^? ^?'It should work using a file as the definition of source file number and a new name for the new file. Works for me:
orcl> alter database create datafile 7 as 'c:\tmp\newname.dbf'; Database altered. orcl>
-
Not a problem/w Firefox - I was wondering if there is a way to enter the special characters and characters (not on the keyboard) in the text boxes? I remember that there is a keyboard sequence that activates a context menu allowing the single character/symbol entry. Thanks in advance, Allan.
See:
Maybe you are looking for
-
How do I open the files on OSX 10.11.5 .that
Hello! There, can someone help me understand how open or convert a .that file?
-
Utility profile WLAN does not start after the removal of some tools from Toshiba
Here, I would like to say that Toshiba software (utilities, entering in laptops) is poor, unstable and mostly useless. I think it makes sense to launch a call to management of Toshiba to stop dealing us with the ugly such software.SHAME ON THEM! For
-
I lost my recycle bin how do I get it back?
I lost my recycle bin how can I get it in my control panel and in the box of oner assistance programs?
-
Hello As the title says after using my laptop without any previous problems, suddenly I can not connect on Windows Vista. I'm 100% sure that the password has not been changed, caps lock, shift, caps lock Num etc is not active. When I bought the lapto
-
Windows cannot communicate with the device he resourse (primary DNS server).
Original title: primary dns. Help, please Windows cannot communicate with the device he resourse (primary DNS server) Please help me solve this problem