Oracle query sort by case-sensitivity
Hi all
I use the oracle 11g database.
My use case is that I have a table with the following values
Name table - test
product id productsortdescription H58098 ACETAMIDOHYDROXYPHENYLTHIAZOLE 043994 Alloy .MM.INTHICK
My query is
select * from test order by productsortdescription;
This query gives the result as it is like
product id productsortdescription
H58098 ACETA
product id productsortdescription
H58098 ACETA
produit id productsortdescription
H58098 ACETA
product id productsortdescription
H58098 ACETA
product id productsortdescription H58098 ACETAMIDOHYDROXYPHENYLTHIAZOLE 043994 Alloy .MM.INTHICKMIDOHYDROXYPHENYLTHIAZOLE
043994 alloy. MR. INTHICK
but early output/outcome should be as below:
product id productsortdescription
043994 | Alloy. MR. INTHICK |
H58098 ACETAMIDOHYDROXYPHENYLTHIAZOLE
like all and ACE in productsortdescription
l is in a small suitcase to C.
The NLS Session parameters are as follows
SELECT * from NLS_SESSION_PARAMETERS;
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS.,.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI. SSXFF AM
NLS_TIMESTAMP_FORMAT-DD-MON-RR HH.MI. SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI. SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI. SSXFF AM TZR
NLS_DUAL_CURRENCY $
BINARY NLS_COMP
NLS_LENGTH_SEMANTICS BYTES
NLS_NCHAR_CONV_EXCP FAKE
Please, help me in this scenario.
One option is to use the NLSSORT function. Most of the ASCII character set defines the sort lowercase before uppercase but EBCDIC kinds of lowercase before uppercase. So you can use
with t as)
Select the id "H58098", "ACETAMIDOHYDROXYPHENYLTHIAZOLE" union str double all the
SELECT id, ' 043994 ',' alloy. Mr. INTHICK' double str
)
SELECT id, str
t
NLSSORT order (str, 'NLS_SORT = EBCDIC')
;ID STR
------ ------------------------------
043994 alloy. MR. INTHICK
H58098 ACETAMIDOHYDROXYPHENYLTHIAZOLE
Of course, if your strings can contain non-alphanumeric characters, you should check that the sort of EBCDIC order is acceptable for them as well. To check this, you can use something like
with t (str, ascii) as long as)
Select chr(level+32), level + 32 double connect by level<=>=>
)
Select str, ascii from t by NLSSORT (str, 'NLS_SORT = EBCDIC')
;
or simply do a search of the internet on EBCDIC. You can also substitute other kinds of language for EBCDIC and see if any of them meet your needs. See Appendix A of the Guide to support globalization for the list of valid values for NLS_SORT.
You say that you are on 11g - if you want to say 11.2.x, then you can use the listagg function to get a more compact view of the sort order:
with t (str, ascii) as long as)
Select chr(level+32), level + 32 double connect by level<=>=>
)
Select listagg (str) in the Group (order by NLSSORT (str, 'NLS_SORT = EBCDIC')) as EBCDIC_order
t
;
EBCDIC_order
----------------------------------------------------------------------------------------------
. <(+|&!$*);- %_="">?': #@'="abcdefghijklmnopqr~stuvwxyz[^]{ABCDEFGHI}JKLMNOPQR\STUVWXYZ0123456789
Kind regards
Bob
(+|&!$*);->
Tags: Database
Similar Questions
-
Oracle 12 c disable case-sensitive password
Is this possible and how?
According
https://docs.Oracle.com/database/121/UPGRD/deprecated.htm#UPGRD60022
The
IGNORECASE
argument ofORAPWD
and theSEC_CASE_SENSITIVE_LOGON
system setting are deprecated in Oracle Database 12cIndeed, they are considered obsolete - by default, passwords are case-sensitive.
You can simply set SEC_CASE_SENSITIVE_LOGON FALSE.
-
query of queries case-sensitive
Hello
I have a question regarding this issue. I am pulling data from an xml file and dump these data in the query of queries and their output. The problem is when I try to order the CSA query, the stem will be high and fewer will be on the bottom. Is it possible to sort them before the dump in query data? Or ways around this?
Thank you.
functions upper() and lower() SQL function in q.
-
Password case sensitive of 11G + DB Vs Oracle 10g reports
Dear Experts,
Currently, we have migrated our database 10g R2 to 11g R2. 11g when using the password is case-sensitive and our password is the mixture of upper and lower charecters.
Our Oracle application server version 10g R2. When we call the report from oracle forms its doesn't open is not the page.
In queue in the report it shows as completed with error: REP-501: unable to connect to the specified database.
But if we keep our db 11g password all higher report runs correctly.
Where I have to change to have upper and lower as db 11g and 10g reports.
This is the right place to post this thread here or I have to post under reports.
Please help us.
Kind regards
Barry MMaybe it helps Re: 10.1.2.3 and RDBMS to Oracle 11g R2 forms
-
10.1.2 running against Oracle DB 11 g - password Case sensitivity of form
We run Forms 10.1.2 and recently updated our database to 11g. We find that 11 g is now case-sensitive passwords. Here's our problem...
Inside of forms, we use the function GET_APPLICATION_PROPERTY (PASSWORD) to recover password of the current user, and then use the string returned to open new forms like this:
We discover that the function returns the uppercase password string only... This is a problem because the password for the user may now be low or cases and therefore the method above to open a new form fails.WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://'||ip_port||'/forms/frmservlet?pageTitle=Mailpiece RCPT Scan&config=TTMSMENU&form=mailpiece_rcpt_scan&userid='||user||'/'||GET_APPLICATION_PROPERTY(PASSWORD)||'@'||:global.DB_Instance||'","","resizable=yes,location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
Is there something that we can change the environment of forms to force the function returns the password of the equally sensitive string case?
Any help would be greatly appreciated.Freely? Well, that depends on your definition. If you are using OPEN_FORM, the form will open and you can access the original shape, which is that you just called. The only limitation is that the two "forms" are contained in the same parent applet window. So, if you use separateFrame = true, which means that you have a window and a window from the applet with 2 floating forms displayed. If you use separateFrame = false, then you only have a single browser window. The applet container notes that the browser and to parent two open forms, but again, they would be independent of each other in the window of one of the parents.
Another option, if you want to continue to do what you're currently would be to enable SSO. This would allow you to open new browsers, but retains the information to log in a more secure way. It would be pointless to include in the URL.
-
I am having trouble with my macbook pro retina (bought new at Apple four months ago)
DSS corrupt on me and will not start, so I had to make a recovery of the internet. Discovered there is an SSD firmware update after that I managed to get my camera up. As applied. All has been well since.
But today I tried to install Adobe CC that I could restore my installation of Photoshop CC. I get an error telling me that the installer does not support case-sensitive volumes.
When I check disk utility, my SSD appears as a "logical volume group" (with a journaled "Mac OS extended" partition type
It is the visible real disk (Mac HD) and it shows up as a "logical" partition
I don't remember doing something special when you are recovering from the internet, or by choosing some funky options. Yet, here I am. I spent a lot of time to restore applications and other. Any recommendations? I feel a sort of reformatting is in my future.
In the Finder, please press the combination of keys shift + command + C, or select
▹ go computer
in the menu bar. A window opens showing all mounted volumes. Select the one in question and open the Info window. Which is shown as the Format in the General section?
-
The WCS URLS are case sensitive?
Hello Expers,
We use Microsoft application Oracle Web center sites 11.1.1.6.1, in our website, the URLS are case-sensitive.
If we wrongly enter any letter in different case(upper/lower) in the URL, giving the content server error.
We do all customizations?
Please let us know your valuable suggestions.
Thank you
Delphine Pilli.
Hi delphine,.
If I understand your question, the answer is Yes, and the best way to achieve this is Vanity URL. The only problem is that in 11.1.1.6.1 is not yet supported, so you would have to implement the framework GSF or update your product to the new version of the Sites with WC, in which this feature is already implemented. Working with Vanity URL, you can easily create URLS for your types of assets, even create patterns that auto generates the links. So, for example, you can use. toLowerCase() to the name of the asset or another similar methods to create the link like you. Take a look at the Oracle documentation:
Configuration of Vanity URLs - 11g Release 1 (11.1.1.8.0)
Kind regards
Enrique
-
the sensitive search case sensitive and non-respect of case-sensitive
Hello!
We are with 11g enterprise edition for our product. In the past, we used the LIKE operator to search for our fields of type string. So, we had an index of based function (UPPER (stringfield)) for non-respect of the case. and an index of second normal for a case sensitive search
Now, we want to use the oracle for the search text option (best performance, search for similar words,...). How work with case oracle text and no respect for case-sensitive?
As far as I know, I can set a lexer and set a property to deal OR not to case... But I need two... Do I need 2 text totalisators?
Thank you
MarkusYes, that's correct.
-
Default search is case sensitive
I go to the Contributor mode and try to choose an image. A window containing all the elements of image content appear. I type the name of the content item (image) in the search text box small on the top right of the window.
It seems that when I enter a value in the text box, it searches case-sensitive. Is it possible that I can do this case-insensitive search. For example; Suppose we have a content item called "IM_ABOUT_US_ICON". If I get home im ' in the text box, I get no results. But, if I go im ", I get all content items that begins with im.
Thank youIt must be contained in this patch: https://updates.oracle.com/Orion/PatchDetails/process_form?patch_num=13502938&aru=14367075&release=7114101300&plat_lang=2000P&patch_num_id=1457428&
Search case-insensitive at the Complutense University of MADRID
Jonathan
http://jonathanhult.com -
An upgrade to 11.2, passwords are case-sensitive automatically?
Operating system: Solaris 10
We are upgrading to version 10.2.0.4 to 11.2.0.3? User passwords will automatically become case-sensitive after the upgrade?Tom wrote:
Operating system: Solaris 10We are upgrading to version 10.2.0.4 to 11.2.0.3? User passwords will automatically become case-sensitive after the upgrade?
No - you will need to reset the existing passwords after the upgrade to take advantage of this feature
http://docs.Oracle.com/CD/E11882_01/server.112/e23633/afterup.htm#UPGRD12434
Passwords for accounts created after the upgrade automatically are case-sensitive.
HTH
Srini -
Question the use of Oracle query Variables
Hello
I am new to Oracle, I tried to extract the data from the Oracle database by using the following query which includes 1 variable SYSDATE_UTS, but when I try to execute the query I get an error. Please let me know what I am doing wrong and how I can fix.
Error message
-----
ORA-06550: line 4, column 1:
PLS-00428: an INTO clause in this SELECT statement
-----
Oracle query
DECLARE SYSDATE_UTS NUMBER: = (sysdate-to_date('19700101','yyyymmdd')) * 86400;
BEGIN
SELECT
INCIDENT_NUMBER,
TO_DATE (to_char ((1/86400 * REPORTED_DATE) + to_date ('19700101', 'YYYYMMDD'), "jj/mm/aaaa hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as REPORTED_DATE_TIME,
GROUP_TRANSFERS
LAST_MODIFIED_BY
, to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * LAST_MODIFIED_DATE, "mm/dd/yyyy hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as LAST_MODIFIED_DATE
, (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) age
CASE
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 0 AND 1, THEN ' 0 - 1 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 2 AND 4 and THEN 2-4 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 5 AND 9, THEN 5-9 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 10 AND 19, THEN 10-19 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) > 20 THEN ' Days 20 + ".
ANOTHER "UNKNOWN".
END AS AGE_GROUP
OF IncidentDataBase
and the STATE not in (4,5,6)
and rownum < 10;
END;If you run this query in sql * plus you can declare a sql * more variable, assign a numeric value according to 'now' and use in your application, i.e.
SQL > variable NUMBER of SYSDATE_UTS;
SQL > exec SYSDATE_UTS: = (sysdate-to_date('19700101','yyyymmdd')) * 86400;You would then call your request, referring to sql * more variable with a colon as SYSDATE_UTS prior to it (i.e.: SYSDATE_UTS)
SELECT
INCIDENT_NUMBER,
TO_DATE (to_char ((1/86400 * REPORTED_DATE) + to_date ('19700101', 'YYYYMMDD'), "jj/mm/aaaa hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as REPORTED_DATE_TIME,
GROUP_TRANSFERS
LAST_MODIFIED_BY
, to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * LAST_MODIFIED_DATE, "mm/dd/yyyy hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as LAST_MODIFIED_DATE
, (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) age
CASE
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 0 AND 1, THEN ' 0 - 1 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 2 AND 4 and THEN 2-4 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 5 AND 9, THEN 5-9 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 10 AND 19, THEN 10-19 days
WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) > 20 THEN ' Days 20 + ".
ANOTHER "UNKNOWN".
END AS AGE_GROUP
OF IncidentDataBase
and the STATE not in (4,5,6)
and rownum<>Table stores IncidentDataBase the "dates" in the number of seconds since the epoch unix?
-
Failed to install Adobe Acrobat Pro XI (case-sensitive user directory)
Hello
I have problems to install Adobe Acrobat XI Pro on my Mac (10.8.3). The installer fails with the message:
The installation failed. Setup has encountered an error that caused the installation to fail. Contact the manufacturer of the software.
After looking in the Setup log (/ var/log/install.log), the problem is:
May 23 01:32:01 mac14.local installed [1117]:. / Preinstall: Installer from...
May 23 01:32:01 mac14.local installed [1117]:. / Preinstall: mode silently.
May 23 01:32:01 mac14.local installed [1117]:. / Preinstall: user folder is case-sensitive. Failed to install.
May 23 01:32:01 mac14.local installed [1117]:. / Preinstall: Installer to walk away with the Code:-3 23 May 01:32:01 wtmac14.local installed [1117]:. / Preinstall: AAMInstaller: exit code: 253
Note that my $HOME directory is on a separate partition from the junkyard. Otherwise, the system partition (where / applications is located) is a case insensitive as usual.
So, why can't I install the latest version of Acrobat with a case-sensitive $HOME directory? I had no such problems in installation of Acrobat 9 Pro.
Is there a way to get around this?
Thank you.
Well, you can temporarily change the path variable during installation... Otehrwise it is correct. Adobe apps don't support case-sensitive sort volumes because - well - software engineers the Apple API for this are atrocious and unreliable.
Mylenium
-
Create user is case-sensitive in XE11?
Hello
I created a user:
CREATE THE TEST USER IDENTIFIED BY TEST TEST DEFAULT TABLESPACE;
I tried to connect with lowercase letters
sqlplus test/test
It did not work.
I tried to connect with capital letter:
sqlplus TEST/TEST
and it worked for me.
Someone who can confirm?
In the 10 XE is was not case sensitive.
Best regardsAchim Klausmann wrote:
Hi Udo,Only passwords or user names too?
Achim
Achim,
You could easily test? Anyway, only passwords are case-sensitive.
Please read: http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams211.htm#REFRN10299
Concerning
Grosbois
-
Photoshop CS6 (extended) installation on case-sensitive disks
I understand that under the "requirements" of the Adobe Web site says you can't install PS CS6 (Extended) on the case-sensitive drives (I use a MacBook Pro, OS X v. 10.7.4). This seems to have been the case at least since CS5.
I did not see this, and I bought (excitedly) update CS PS5 (Extended) to SP6. I had NO PROBLEM installation PS5 on this drive.
Of course, as others have said, the installer refuses to allow you to install on a case-sensitive drive (for example, no options to install on another drive). There is also no mention that CS6 must be installed on the boot drive.
Requiring installation on the boot drive has serious implications for those of us who need readers sensitive to other work; I don't want to have to restart on another drive when I use PS and switch back and forth - it's all just stupid.
From my point of view (as a user, granted), this is lazy programming, and this must be resolved as soon as POSSIBLE. At least in my case, I have a piece of a $400 software just too place, when I want to be up to my eyeballs enjoying PS6 throughout it's fame.
Outside an Adobe fix, I don't see a solution to this problem. If I wipe my drive, put in shape in case-insensitive, then I lose the functionality for other critical work. In addition, I'm not sure the process of wiping the disk, formatting it not sensitive to case and restore TimeMachine everything would be even work (since the backup hardware is from a case-senstive drive and try to go to a drive that is not case sensitive).
The REALLY frustrating part is that I have installed Photoshop 3, 4 and 5 (and much, much further) on the casing of the disks - all with no problem. It is only now that the question slap me in the face.
It has to be a work around, if not a 'real' solution.
What help you might be able to offer would be greatly appreciated; details can be sent to cdretk at gmail dot com
I hope, and I thank you in advance.
Now I solved it (no thanks Adobe, who I am very disappointed).
In the past, when you wanted to install something on your Mac, you simply copy a folder in your Applications directory.
Photoshop (among other programs) got more complicated, it is decided that it must install things in the different system directories and potentially in your user directory.
That is the question (and the solution, in this case). My user directory is on the drive that is case-sensitive. I don't know what Adobe needs to install (as Photoshop is, after installation, available to all users), but this has been the key.
SOLUTION: Log on as another user (administrator-enabled) and install it. Bang - it works without any problem.
Yes, I still had to copy all my plug-ins, etc. of the PS5 by hand (and sort those SP6 is not like - once again at hand), but at least it works.
Good software engineering practices dictate that installed software should PREFER discs case-sensitive and not case insensitive (think of the data).
Good installation support (on the phone) should at least suggest trying another user account...
Adobe: You owe me for my time on this one. Where should I send my invoice?
-
Passwords are case-sensitive in 11g
Hello
It is a rather silly position, but I've been googling and can't find if Developer SQL supports case-sensitive or not connection. I read some other clients always send a 'uppercase' password (no matter how you typed it) that causes problems with Oracle 11 g. Is "compatible" with the new policy of the case-sensitivity of 11g SQL-Developer?
Thank you.Yes SQL Developer is certainly compatible with the case of 11g password.
Maybe you are looking for
-
Satellite Pro A100 - unable to connect to the internet
I'm unable to connect new Satellite Pro A100 to my youngest daughter to the internet.I have a cable modem Netgear DG834 router that works perfectly with my desktop pc and laptops other two of my daughter.I checked all the settings, but to no avail. C
-
Original title: DirectX will not install. I blew on it this time, and I completely uninstalled DirectX to attempt to clean install it. Now, it will not install. I get the error "an internal system error has occurred. Please refer to the DXError.log a
-
I accidentally did a reinstall on windows vista, of course, I've lost all the new settings but can I restart from the windows.old folder to find all my data
-
How to change the user name in windows 7 Professional?
I recently installed windows 7 Professional and by chance I typed my user name and the computer when it prompted me to type it in. When I had typed the wrong characters in and click on 'Next', he wouldn't let me go back and change it, so I was stuck
-
My printer will no print only once, then hangs until I reboot
I have Windows 7 and printer Dell V515w. I have had this problem for a few months and have dealt with him by restarting the system, how the files in the queue than any print. I have seen that some people have problems with Internet Explorer 11, but