SQL & PL/SQL :: Syntax To Substring Only English Character And Exclude Sanskrit Characters
Nov 6, 2010
i have a column full name which has the name of customer in both English and Sanskrit alphabets. I need to susbtring only the English name and exclude the Sanskrit name .
I'm running a query using SQL Developer on a table which contains several companies names from many different countries, and one of the checks I need to make to ensure data consistency is to search for all rows which the name of company contains special or non-english characters (like ç, ã, ä as example).
I don't know what can I use to do this. I tried to collate using NLS_SORT but it didn't work.
Is there someway to select only the rows that contain these special or non-english characters, excluding from the results the rows that only have english characters? We have many languages in this table.
The field I would like to make the conditions on is VARCHAR2.
How to select a substring in oracle up to a more than one specific characterfor ex : 121.051^NP: FAMILY PRACTICE ( trim the values before ^ ) 121.051^*NP: FAMILY PRACTICE (trim the value before *). with below function I can only get rid of ^ , I want both the specific characters ^ and ^* to be removed at the same time.
I want written English characters only in text item (I want control in one text item), in my form 10 g but, in same form can be written other language in other text item.
I have a table. It's name is INSTITUTION. It has a NUMBER INS_ID and NVARCHAR2(50) INS_NAME . INS_NAME can contain Turkish characters, such as "ğ,ü,ş,ç,ö". According to business logic, there can not be a repetition on the INS_NAME.User will enter institution name from a textbox in ASP.NET , and I check this name in database from c sharp code, if there is no repetition, we will add this record.
The problem is; when user enter a instition name that contains Turkish character, there is a duplication. If there is a instition name is *"su işleri"* , the both query; SELECT * FROM INSTITUTION WHERE INS_NAME = *'su işleri'*; and SELECT * FROM INSTITUTION WHERE INS_NAME = *'su isleri'*; returns no result, even though there it is.But if instition name is "oracle corporation" (there is no Turkish character) it query successfully. I have the same problem in Toad for Oracle 11.5.1.2. When I query database from toad SELECT * FROM INSTITUTION, the phrase *"su işleri"* has appeared. But when I query SELECT * FROM INSTITUTION WHERE INS_NAME = *'su işleri'*; , there is again no result.When I connect oracle database directly and perform the query SELECT * FROM INSTITUTION , the phrase *"su isleri"* (not *"su işleri"* ) has appeared.
Here are the language settings of the database:
National Language Support National Language Parameter Value NLS_CALENDAR______________GREGORIAN NLS_CHARACTERSET__________WE8MSWIN1252 NLS_COMP__________________BINARY NLS_CURRENCY______________TL NLS_DATE_FORMAT__________DD/MM/RRRR NLS_DATE_LANGUAGE________TURKISH NLS_DUAL_CURRENCY_________YTL [code]....
how do we know database character set is either single character set or multi character set?
While changing character-set from AL32UTF8 to WE8MSWIN1252 got "ORA-12712: new character set must be a superset of old character set".
Below are steps taken to resolve the issue -
ALTER DATABASE CHARACTER SET WE8MSWIN1252;
i got this error: ORA-12712: new character set must be a superset of old character set
below are the commands executed by me:
SQL> SHUTDOWN IMMEDIATE; SQL> CONNECT SYS/password AS SYSDBA; SQL> STARTUP MOUNT; SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION; SQL> ALTER DATABASE OPEN; SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE WE8MSWIN1252; SQL> SHUTDOWN; SQL> STARTUP; SQL> QUIT;
And its working...
I have not done it in proper order. Neither have done ccsscan. Still, no user reported any issues. Do my changes truncated the data?
create table test ( name varchar2(50), descd varchar2(50) ) insert into test values ('kethlin','da,dad!tyerx'); insert into test values ('tauwatson','#$dfegr'); insert into test values ('jennybrown','fsa!!trtw$ fda'); insert into test values ('tauwatson','#$dfegr ,try');
how do I get the first three characters and last three characters from name field and remove all the junk characters from descd field?
I have two tables A and B. In table A there is a field which contains a string of 20 characters; this essentially holds 5 codes of 4 characters each.
Table B is a reference table. It holds the 4 character code and the description.
I am trying to run a select query to bring back the description of the code for the first 2 codes in table A but i am not sure how to bring back the descriptions! The below is what i am trying to achieve.
I have a reference number of application number which is sent to 3 different address as outward number . for example application number is intimated to the office , the employee and the treasury. this number is generated as follows
P/11/10/133 P/11/10/133A P/11/10/133B
in my outward report when i run it all three numbers are getting listed.
i want only P/11/10/133 to be listed and ignore the rest of the two. i tried to use SUBSTR(INOUT_NO,9), but it reads only from the left gives me only the number ie 133, 133A and 133B. i tried rtrim and ltrim but it only clears the extra space. how do i ignore the other two dispatch numbers.
I need to substr the transaction number which starts with PIT to susbst (trxno,1,12) .. and anything other than PIT i need full number without substr . But when i use the above code :" susbstr(trxno,1,12) ..": it will substr entire column,. Is there any way to substr only PIT and leave others,
In a not normalized table loaded with data from an excel file, I have a column containing a long string with many carriage returns so that after each of them it begins a new string I have to manipulate. I mean, in the column PERSON I've got something like this:
PERSON _______ Jonh Taylor Software developer ...
Of course I have to write a Pl/Sql procedure extracting each string and I know that each string ends with a carriage return chr(13)||chr(10)
I think I should use the INSTR built-in function but I it'd be useful whether some of you had something ready.
My client is using oracle 10 r2 on window 2003 server with arabic characterset WE8ISO8859P1. I am facing problem to understand the language specially in the case if any error occur it display me unknown characters.Is there any way to display it in English language??
I have also tried to change it in registry i.e changing NLS_LANG to AMERICAN_AMERICA.WE8ISO8859P1 but no success.Below are the parameters value of my database.also attach snapshot of sqlpromt.
I need to prepare a bilingual system (English and Arabic).
So i need to store data in English as well as in Arabic
Is there any possibility to convert the data from English to Arabic and Arabic to English through oracle forms
basically what i am thinking is let us suppose user selected the English version of the application and he entered all the data in English during saving the records i need to convert all the English data into Arabic and store it in another table for Arabic data reference.
I am a programmer in Oracle PL / SQL in Oracle 10g I'd like to use the same time on one Database two types of fonts English and Russian (Cyrillic). Is this possible and how? NLS_LANG ?
I have a table zTEST with several products and ID's. Now I want to exclude all products which are in table zTEST_EXCL and have ID's up to ID+2. The Result is then in table zTEST_RESULT.
I have a problem in Oracle Forms 10g. For any field that should be by default right-to-left (arabic), the reading order is changed when entering the field, but the keyboard is not changed to Arabic automatically. The user has to type ALT+ Shift to manually modify the language.
I worked before with Forms 2000 and Forms 6i (in client/server mode only), it was working fine. Is it impossible on Web Forms? Must I use a Java Bean? If yes, is there something existing to perform what I need?
I have a table having data in different languages like English, Japanese and Chinese. I need to retrieve only those rows which are in Japanese. What all settings do I need to make. When am doing a normal select, rows in languages other than English are appearing as Junk data.
REQUEST ---------------------- request_id item_name unit_of_measure UOM_CODES_TL ("tl" means translation - this table has the same record 3 times, once for English, once for Spanish, and one for France) ---------------------- unit_of_measure description language [code]....
So what I'm trying to do with the outer join ((+)) is to get the request record, regardless of whether the r.unit_of_measure is null. That works as long as I don't include the underlined portion above. As soon as I do that it only returns results where r.unit_of_measure is not null. That all makes sense to me, but I'm wondering how I can restrict the values to English without requiring that a value exist in the request table.
I'm trying to insert a character from the extended ascii character set. Specifically, there's a company that has an accented e (�) in the name. Right now, the company name doesn't have the e at all, accent or no accent. So I'm trying to do an update, something like
update table1 set company_name='blah�" where company='blah'
It runs, but doesn't do the update. Even when I try to forcefully do an insert (instead of an update) I get nowhere; the accented is simply dropped. So the basic question is, how do you insert extended ascii characters into oracle?
I am using C++ OCI LIB, to insert some report data from remote OCI client to oracle 11 server. This data is read by another process to create the report.The DB CHARSET is UTF-8. But the report tool expects the data to be ISO08859-1 encoded. So while inserting the data into the database i specify the following LANG and CHARSET for my table colulmn in client:
The TARGET DB CHARSET is UTF-8 NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 size_t csid = 871; // UTF-8 OCIAtrSet((void *) bnd1p, (ub4) OCI_HTYPE_BIND, *(void *)&csid*, (ub4) 0, (ub4)OCI_ATTR_CHARSET_ID, errhp);
This solution works for almost every case of ASCII and Extended ASCII Charest but we are facing issues if we have few specific characters to be inserted.f we are trying to insert single beta character [β] through client, the data goes empty to the column.
Beta Character details: DEC OCT HEX BIN Symbol Description 223 337 DF 11011111 ß Latin small letter sharp s - ess-zed
DB Output after insert single β: select rawtohex(NAME) from PERSONS where EID=333;
RAWTOHEX(NAME) ---------------------------
But if the string is *"ββ"* everything work fine: DB Output for "ββ": select rawtohex(NAME) from PERSONS where EID=333;