Request to make cases in sensitive order by a statement select union
Hi allI want to perform a case-sensitive by an instruction order select union.
SELECT SERVICEREQUEST_SYSNO, SERVICEREQUEST_DESC from STHV_PRODUCT_SRTYPE_DETAILS WHERE COUNTRY_CODE = #countryId # AND PRODUCT_DESC = #ProductVal #.
Union
Select distinct SERVICEREQUESTTYPECODE, SERVICEREQUESTTYPE from CWFV_RULES_AS ARC, SPM STH_PROCESS_MASTER where COUNTRY_CODE = #countryId # and PRODUCT = #ProductVal # AND SPM.description = ARC. Order lower B_WORKFLOW_NAME (SERVICEREQUEST_DESC)
the above query gives me error when I order by lower (SERVICEREQUEST_DESC)
Can someone help me on this.
Kind regards
Sandeep.
One way is below. Why would take you an order, case-insensitive? Not tested.
select *
from (
SELECT SERVICEREQUEST_SYSNO,SERVICEREQUEST_DESC From STHV_PRODUCT_SRTYPE_DETAILS WHERE COUNTRY_CODE = #countryId# AND PRODUCT_DESC = #ProductVal#
union
select distinct SERVICEREQUESTTYPECODE,SERVICEREQUESTTYPE from CWFV_RULES_AS CRA,STH_PROCESS_MASTER SPM where COUNTRY_CODE=#countryId# and PRODUCT=#ProductVal# AND SPM.description = CRA.B_WORKFLOW_NAME
)
order by lower(SERVICEREQUEST_DESC)
Tags: Database
Similar Questions
-
Values in the list by the order of table in SELECT Union
Version: 11.2
Apparently a very basic thing. But I couldn't do it :)
In the UNION example below automatic sorting in is based on alphabetical order. I want to get rid of this sort and list the values according to the order of the table in the SELECT.
Test data
In the above example, I want the values in the first array SELECT listed first, then all the values of the second table in SELECT it and so on.create table test1 (name1 varchar2(10)); create table test2 (name2 varchar2(10)); create table test3 (name3 varchar2(10)); insert into test1 values ('EARTH'); insert into test1 values ('TAURUS'); insert into test2 values ('YELLOW'); insert into test2 values ('ALPHA'); insert into test2 values ('TANGO'); insert into test3 values ('BRAVO'); select name1 from test1 union select name2 from test2 union select name3 from test3; NAME1 ---------- ALPHA BRAVO EARTH TANGO TAURUS YELLOW 6 rows selected.
Basically my requirement will be
Expected results:Return all values from test1 (alphabetically sorted) then Return all values from test2 (alphabetically sorted) then Return all values from test3 (alphabetically sorted)
NAME1 ---------- EARTH ------------> from the first table in the SELECT TAURUS ------------> from the first table in the SELECT ALPHA ----------------------> from the second table in the SELECT TANGO ----------------------> from the second table in the SELECT YELLOW ----------------------> from the second table in the SELECT BRAVO ------------------------------> from the third table in the SELECT
Hello
Union made a distinct in terms of the line. From the line "ALPHA", 2 and the line 'ALPHA', 3 are different, they both show in the result set.
Further, you are all just lucky, that you get the results you want with the order clause:
order by 2
This performs a sort on the second column (1,2,3)
Also, you want to sort on the first column (name1, name2 and Name3). The order clause should be (as already shown correctly abbove):order by 2, 1
Kind regards
Peter
-
I gave in November at$ 20, why am I still a request to make a donation?
I noticed that whenever I open my Firefox, I always get a request to make a donation. I have responded to their online form and have a Paypal receipt for it. Should demand disappear or is it now standard on the opening of Firefox? Most other organizations e g Wikipedia remind you after you have given.
This is part of our end of year gift campaign. Show all Firefox users who have the default "topic: Home" game from the homepage. It doesn't have a way to say that you've already given unfortunately. You can ignore it, or change your homepage until after the beginning of the year.
Sorry for the inconvenience and thank you for the gift!
-
Is there a way to make the less sensitive touchpad?
I like to use the tap to click on my touchpad, is it possible to make it less sensitive?
I'm using an Acer Chromebook 11, CB3-111.
I had been moving the touchpad at the slower speed. It seems better to work on more quickly.
Thank you very much for your help!
-
Alphabetize the blocks of text, duplicate and make a list in order
I am trying to take the selected text, sorting alphabetically, then duplicate all the text thus, it comes as a list.
So, if I had the following selected...
And ran my script... I have just a vague start on...
#target illustrator var doc = app.activeDocument; var selectedItems = doc.selection; var alphaList = []; for (i = 0; i < selectedItems.length; i++){ alphaList.push(selectedItems[i]); } alphaList.sort();
The results would be this...
Someone at - it advice for me? Thanks in advance!
Hi subieguy2,
It is not the best way, but it's a way:
#target illustrator // https://forums.adobe.com/thread/1880702 // Alphabetize text frames, duplicate and make a list in order var doc = app.activeDocument; var selectedItems = doc.selection; var alphaList = []; for (i = 0; i < selectedItems.length; i++){ if (selectedItems[i].typename == "TextFrame") { alphaList.push(selectedItems[i].contents); } } alphaList.sort(); var aTF = doc.textFrames.add(); aTF.position = [0,0]; aTF.contents = alphaList.join("\r");
Have fun
-
SELECT INTO make case-insensitive query?
Hi all
I'm having a problem with a query as if it is case-insensitive when I do a «SELECT table.x variable INTO...» ». If I do the same query, without the "variable INTO", I get a result as expected.
The query is similar to the following:
SELECT table_id variable FROM table WHERE table.varchar2column = 'name' AND table.integercolumn = int_variable;
There is a unique constraint, forcing the varchar2column / integercolumn of the unique values.
If the varchar2column has two entries that differ only in this case, a regular at the statement select returns a result. However, the procedure stored with the, I get the following error message:
ORA-01422: exact fetch returns more than number of lines
He gets not only if I remove the entry that only differs in the case of the letters. It is 10.2.0.1.0 Oracle, if that matters.
I need this application to be case-sensitive. I'm not an expert of the DB, I'm just a developer trying to solve a problem. I tried to run "ALTER session SET nls_sort = binary" in the stored procedure, but I guess I can't do that...
Any suggestion would be appreciated.As mentioned before... name your best-er settings.
Your setting is the same as the name of the column on the table that you query... bad move.
Here I change the username to work things p_username and 'magically '.
CREATE OR REPLACE FUNCTION get_cached_user_id(p_username user_security_table.username%type, authserver user_security_table.authentication_server_id%type) RETURN user_security_table.user_security_id%type IS cacheduserid user_security_table.user_security_id%type; BEGIN 6 SELECT uat.user_security_id INTO cacheduserid FROM user_security_table uat WHERE uat.username = p_username AND uat.authentication_server_id = authserver; IF cacheduserid IS NULL THEN SELECT uat.user_security_id INTO cacheduserid FROM user_security_table uat WHERE uat.username = 'anonymous' AND uat.authentication_server_id IS NULL; END IF; RETURN cacheduserid; EXCEPTION WHEN NO_DATA_FOUND THEN SELECT uat.user_security_id INTO cacheduserid FROM user_security_table uat WHERE uat.username = 'anonymous' AND uat.authentication_server_id IS NULL; RETURN cacheduserid; END; 21 / Function created. TUBBY_TUBBZ?SELECT get_cached_user_id('sample',20) from dual; GET_CACHED_USER_ID('SAMPLE',20) ------------------------------- 2 1 row selected. TUBBY_TUBBZ?
Simple fix... development of a standard in the future, as for all procedure using p_ settings can save you a lot of grief.
-
Hello
What is the best (optimized) way of case-insensitive sorting? Order of lowercase (field) will use an index?
Thank you.Hello
The use of lower - box () is a good choice. If the index takes effect is due to the index of the container and a query expression. If you meet all specified performance problem, please report the issue or send me by e-mail ([email protected]). Thank you.
Best regards
Zhao Rucong
Oracle Berkeley DB XML -
IOM - OAM 11gR2PS2 and 10g protected webgate application integration.
When new users trying to access to protected application the user redirected to the screen for the IOM change password (which is correct behavior) and here once the user change the password and submit does not load the protected application. SST If g 11 protected asks consulted then it works fine. Here's the use case:
To access the OHS 11 g protected page IOM: https:// < LBR_URL >: 4443/identity /
the user redirects to - >
https:// < LBR_URL >: 4443/identity/faces/firstloginbackUrl=https%3A%2F%2F < LBR_URL > % 3 A 4443% 2Fidentity & _afrWindowMode = 0 & checksum = A9745E7CE5D7A5B96116C67FB2BBA09...
Above you can see backUrl stores the value of the requested url.
after a successful change password user redirected to - > https:// < LBR_URL >: 4443/identity/which is expected.
Now with 10g Webgate (jboss) protected:
10 g webgate protected access request as https://ABCD.com:8443/ShoppingCart/default.htm
the user makes a redirect to - > https:// < LBR_URL >: 4443/identity/faces/firstlogin?backUrl=%2Fidentity%2Ffaces%2Fsignin & _afrWindowMode = 0 & checksum = F35AFC1E9A9734D0FC583669B3DD62105F897B332B7303044855B9B0CC42C072 & _afrLoop = 371...
Now you can see backUrl NOT stores the value of the requested url and some URLs as maintaining == / faces/registration.
after successful change password user redirected to->https://< LBR_URL >: 4443, identity, faces, signin? _afrLoop = 3715664044314206 & _adf.ctrl - State = fq36gphqz_77
Is there a limitation with this? I couldn't see any parameter that allows to control this on webgate 10g.
Vinay
Too bad I got the answer.
If you see the newspapers you can see the warning like:
XL not defined AllowedBackURLsMode In version IOM 11.1.2.1.4 has introduced a new improved security to prevent the use of a backurl to redirect a user to a malicious url.
It can be controlled by XL. AllowedBackURLs.
-
Vinay
-
Request contact form case management process
Users of gDay BC
I have a client who wishes to use BC e-mail that way BC intends it to be used. However, I don't have a good explanation of how this is done.
For example, when a client sends a request for contact form, my customer receives a notification of workflow, which then opens the secured link that takes him directly in the case.
It then uses the response of BC from inside this case area. Then the original customer receives the email responded with a chance to "answer above this line" and start a thread of emails. After that the customer does not respond, the following e-mails occur only in e-mail and without CB customers. Is this normal? I thought all emails would be kept in the database, and a wire will be held which is officially in British Colombia.
Can someone point me to a page that explains the process that intends to make of the BC system to the customer?
see you soon
Darryl
GDay Mario and Liam
I read on the TSA in the knowledgbase BC now, and I see that it has to be configured. I've been wrongly feel that emails from data collected have been setup by default, then he thought mysterious that they were not the fact.
Thanks for that I see that he needs to be put in place, so I'm going to jump in, I'm eager to get this permit.
see you soon
Darryl
-
Make case-insensitive oracle database
Hi all
I use oracle 10g EE that my front end and database backend is in c# .NET. I want to make my oracle database to perform any case comparison insensibly. I searched the net and found several ways to achieve
1. use the upper function in procedures - cannot afford
2. order of the function - cannot afford
3. setting session parameters
ALTER SESSION SET NLS_COMP = ANSI;
ALTER SESSION SET NLS_SORT = BINARY_CI;
The 3rd is promising and can save a lot of time. I have several question
1 is there a way I can adjust these settings in .NET?
2 is it possible I can set both and will do only my case insensitive database?
any link, reference is very appreciated.
Thank youYou can create a unique index of the feature based on this column to avoid that these records.
I don't see that should be case-insensitive database here.
-
Request amount and case assistance
I need help please with the following query.
I have a table that contains a currency, voucher, start_date and one value.
Data in the tables looks like this:
GB, 31/05/2010, A, 100
GB, 31/05/2010, B, 250
GB, 31/05/2010, A, 72
GB, 12/12/2009, A, 1000
GB, 12/12/2009, B, 72
LX, 05/12/2010, A, 90
This is where it gets complicated, I need to show total (SUM) value when the start_date < 60 days from sysdate and also when the start_date > 61 days AND only if the good = and compartmentalized to the currency.
So in other words I need my results like that.
GB, 31/05/2010, A, 100, * 172, 0 *.
GB, 31/05/2010, B, 250, * 0, 0 *.
GB, 31/05/2010, A, 72, * 172, 0 *.
GB, 12/12/2009, A, 1000, * 0, 1 000 *.
GB, 12/12/2009, B, 72, * 0, 0 *.
LX, 05/12/2010, A, 0, 90 * 90 *.
The columns "BOLD" are what I need, a called less_than and a more_than.
A great big thank you and all the advice, I appreciate it.
SPlease make it a habit to post examples of data we can work with immediately using the CREATE TABLE and INSERT INTO statements, or use the clause WITH, as shown below:
SQL> with t as ( -- generating sample data: 2 select 'GB' currency, to_date('31/05/2010', 'dd/mm/yyyy') start_date, 'A' voucher, 100 value from dual union 3 select 'GB', to_date('31/05/2010', 'dd/mm/yyyy'), 'B', 250 from dual union 4 select 'GB', to_date('31/05/2010', 'dd/mm/yyyy'), 'A', 72 from dual union 5 select 'GB', to_date('12/12/2009', 'dd/mm/yyyy'), 'A', 1000 from dual union 6 select 'GB', to_date('12/12/2009', 'dd/mm/yyyy'), 'B', 72 from dual union 7 select 'LX', to_date('12/05/2010', 'dd/mm/yyyy'), 'A', 90 from dual 8 ) 9 -- 10 -- actual query: 11 -- 12 select currency 13 , start_date 14 , voucher 15 , value 16 , sum(case 17 when trunc(sysdate-start_date)< 60 18 and voucher = 'A' 19 then value 20 else 0 21 end) over (partition by currency, voucher, start_date) sum_val1 22 , sum(case 23 when trunc(sysdate-start_date)> 61 24 and voucher = 'A' 25 then value 26 else 0 27 end) over (partition by currency, voucher, start_date) sum_val2 28 from t; CU START_DAT V VALUE SUM_VAL1 SUM_VAL2 -- --------- - ---------- ---------- ---------- GB 12-DEC-09 A 1000 0 1000 GB 31-MAY-10 A 72 172 0 GB 31-MAY-10 A 100 172 0 GB 12-DEC-09 B 72 0 0 GB 31-MAY-10 B 250 0 0 LX 12-MAY-10 A 90 90 0 6 rows selected.
-
Download a DVD Maker and burner in order to burn pictures on a DVD
I guess I have to download a DVD Maker to my Home Basic Windows Vista model T3646 H32 version to burn pictures on a DVD, a DVD burner. How can I get downloads and what are the indications for do?
Hello Miss Roxane,
Thank you for your message. You can look in Windows Live Movie Maker for free option to make a slide show and burn it to CD or DVD. You also have the possibility of purchase of download/3rd party software that will do the job you're looking for.
I also move this thread to the programs Forum.
See you soon
Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.
-
First Pro by using too much memory request during make
Mackbook pro mid 2015
16 GB of memory
a first set to only use the 10 GB of emory
using separate disk for the media and "scratch disks"
nothing running accepts Prime Minister
I can make small selections at once. I had success with several clips containing about 1000 images. But, every time I try to make more choices a warning system appears and forces me to exit the program.
Thanks for the reply! I looked at the updated 9.2 release date day and my problem is probably resolved if there was in fact a memory leak!... I did make a movie highly light-performed since then. Thanks again!
-
Is it possible to make a hyperlink sensitive date in Muse (or with a few 'Add')?
Hello
I need to catch up an advent calendar for a group I help lead. You will reap the images and other things on the last Sunday in November, and I would like to make a composite picture for the Front of advent calendar, then leave a window to become active every day of December.
Any ideas?
See you soon
Steve
This requires a dynamic backend because otherwise has no way to control of access privileges and the link States. Unless you can find a widget tailored, you are out of luck and may need to update the page manually every day.
Mylenium
-
How can I make orders save their State when the project is closed?
I am currently working on the program for a compact RIO which will be used with a variety of instruments. Some data on each of these instruments calibration must be entered into the program via the controls on the front panel, so they can produce the correct value (for example, the input range and a pressure transducer units are required for the program to a scale of 4-20 my reading in a pressure reading).
The problem that I am running is that, every time I close the project and open it again, all calibration checks back to their default value. What I want to do is to save their State whenever the program is closed so that if you reopen the project without changing the material you don't have to re-enter the calibration values. Can someone tell me how this can be done automatically?
I know that this can be done manually by saying to each control to set the current value to its default value, but I'd rather not have to do whenever we change the calibration constants. Ideally, the user does not have to use the context menus like this.
Maybe you are looking for
-
Have used the SD Transcend 360 256 MB card for data storage with success during the last 6 months on my MBP to mid-2014. Installed their wake from sleep early support software. Above error code invite you in this context: I wake up Mac in the mornin
-
Hello fellow Firefox users!This problem has recently begun, probably at the time, I started using Sync. If I use Facebook on my desktop and I am already connected from my laptop, the system requires the laptop to log off when the office sign and vice
-
Toshiba 46TL838 - I need new firmware
Hello TV: 46TL8386.0.08.1 worm.IM from Poland - Polish version /. My TV does not have to update the menu. IM connecting to the ethernet LAN I need minimum 6.4 version because in my sweet 3D option does not work on the USB key. I can guarantee to the
-
Windows 7 does not contact Canon MP250 printer scanner
Tried to download drivers and software updated on the Canon, but Microsoft site not even allow them to get a foot in the door. I get the message, "do you want this program to make changes to your computer? I agree, it goes through the installation ap
-
LAN died after turning the Mode standby with Windows 7!
I have a motherboard Intel DX58SO with the last LAN driver v15.3. After my computer goes to sleep and then he wakes up, back to the top of the LAN adapter is turned off and it won't work again until I restart my computer. I have Windows 7 Ultimate 6