Case Insensitve Ordering
My CFQUERY is working fine, and has for years. I am ordering
my lastname. Just recently a client joined the list with a last
name that starts with a lower case letter. As many of you know,
lowercase appears at the end in a database sort. This really screws
up my reports.
I tried using ORDER BY lower(lastName) and ORDER BY
UCASE(lastName) but neither of those solutions work. They throw
errors. What am I missing here? What is the best way to deal with
this?
I see. I was adding lower(lastname) to my order by statement.
Using the alias solved a couple of problems. Thanks Dan.
Similar Messages
-
ISH-CO Integration (Case based order could not be created)
HI,
My name is Yael Jacobi; I am a CO implementer in SAP Project in Israel.
The project is for a hospital in Israel.
We are trying to implement the integration between the CO (Controlling) and the ISH module.
I haven't found any valuable information in the internet until now.
I will be grateful if you could send me any documentation regarding the ISH-CO integration
I am trying to create a case based order (internal order that should be created for a case in the ISH) but with no success.
I created an internal order type in CO and customize the relevant data ,in the basic settings for "SAP Healthcare-integration with controlling" ,but no case based order had been created .
The revenue posted to the profitability analysis segment instead of the case order.
Maybe do you have any idea why is that and what is missing?
I would really appreciate it if you could help,
Thanks in advance;
Best Regards,
YaelHi Yael,
first of all good to hear that you solved the problem. Actually we have a couple of similiar processes where SAP Patient Management uses "standard" ERP functionality in the background. Sometimes it is a good strategy to first check out whether the "standard" functionality works as expected by invoking the respective transactions in ERP manually (using the values which you lateron expect IS-H to use automatically). If they work according to your expectations you can then focus on the IS-H configuration.
I'd like to come back to your point on the documentation. If you write that you think it was not good enough, I am sure you have some ideas how to improve it? As you may know we are moving more and more into collaborative documentation technology like Wikis. Would you be willing to maybe actively help improving parts of the documentation by sharing some of your experiences and knowlegde?
For example, we could jointly start a Wiki page on the topic of IS-H/CO integration.
Please let me know your thoughts.
Best regards
Claudius -
Hi,
1. How do we use Case Base Orders in IS-H module?
2. Will Case Base Orers will be created automatically when we create Case?
3. Do we directly make postings to Case Base Orders or When we assign services and do billing, will it automatically update?
Please explain me in details..
thanksThere are various use cases which require to place an order without a case assigned.
For example any order for patients which were not yet treated in the hospital before. In real life you will have quite often calls from external clinics or doctor who would like to perform a certain diagnostic procedure in the hospital. As there are no patient master existing and also no cases, usually the preliminary patient concept is used to capture patient's data.
By using the preregistration workflow all pending clinical orders you fairly easy used to admit a patient in the clinical process builder application. On performing the admission the clinical order is converted to one with patient and case. All following steps such as performing service will follow the standard procedure as you may know for performing services.
Cheers,
Axel Biernat
Siemens AG
Product Commercialize - Knowlegde Transfer -
Regarding case in ORDER BY clause
Hi ALL,
I am having scenario that a flag value is passed ,if the falg is 'Y' ,i need to do order by with 2columns ,if the flag is 'N' no need do order by
i tried and i am able use only single column in the case statement.
Regardsselect last_name,emp_no,case when sal>1000 then 'Y' else 'N' end flag
from emp
order by
case flag
when 'Y' then 1
else 2
end;
Edited by: Mahanam on Dec 20, 2010 1:13 AM -
Hi. I have a select statement that returns a ref cursor for a report I'm working on. My predicament is the order by depends on a parameter provided by the user. If you have any suggestions or related experience, please let me know...I would greatly appreciate it.
-- Requirement is
IF P_SORT = 1 THEN
SORT BY emp_id, emp_name, hiredate
ELSIF P_SORT = 2 THEN
SORT BY emp_name, deptno, hiredate
ELSE
SORT BY emp_id
-- Current statement
SELECT emp_id, emp_name, hiredate, sal
FROM employee
ORDER BY CASE
WHEN P_SORT = 1 THEN 'emp_id, emp_name, hiredate'
WHEN P_SORT = 2 THEN 'emp_name, deptno, hiredate'
ELSE
'emp_id'
END;
The statement is compiling but the order by is not working. I hope this is possible. I've searched here and there and I can only see order by's set with only 1 column and with the same data type as the other option.
Thank you.Dynamic SQL (you don't know what the query is until runtime), so build the statement string based on the parameter value. Roughly:
v_stmt := 'select this, that, whatever into ... from wherever':
--do the if-then-else or case in PL/SQL
if 1 then v_order := ' order by this, that, whatever';
else
v_order := ' whatever, that, this';
end if;
v_stmt := v_stmt||v_order;
execute immediate v_stmt; -
Case insensitive ordering ??
Is it possible to set the query odering on a string field and have it be
case insensitive? Right now my lower case & upper case strings are
getting sorted seperately, but I want them sorted together
i.e.
Alex
andover
Busy
ball
Rathern than
andover
ball
Alex
BusyYup .toLowerCase() worked just fine :)
Damian Bradicich wrote:
I'm going to try .toLowerCase() in the ordering, it works in the query,
why not in the ordering ;) I'll reply shortly to give an update
Damian Bradicich wrote:
Is it possible to set the query odering on a string field and have it be
case insensitive? Right now my lower case & upper case strings are
getting sorted seperately, but I want them sorted together
i.e.
Alex
andover
Busy
ball
Rathern than
andover
ball
Alex
Busy -
Nautilus case sensitive ordering
Hi,
Just wondering if it's possible to make nautilus order files without case sensitivity when they're sorted by name.
I've tried a few searches but turned up nothing, except that the gnome documentation says it isn't case sensitive (here)
There's nothing in gconf either, as far as I can see.
If I recall correctly, it wasn't case sensitive when using nautilus in other distros...
Sorry if this has come up before, but I couldn't find anything in the forums.
thanks
Fishonadish[/url]Sorry to dig this out, but I have the same problem here. Maybe it has something to do with a Locale setting?
EDIT: Indeed, changing the Locale did fix the problem. Add this to your ~/.bashrc
export LC_COLLATE="en_US.utf8"
Note: Now most programs will sort files insensitive including the "ls" command.
Last edited by IceHand (2007-05-07 18:37:59) -
OK, Im using a select statement and all the works, but when i try to order by a column, it sorts it using the ascII values of the text, so "CAPS" comes before "caps" or even "apples"... is there a way to sort strings case-insensitively?
Thanks
EdI think using the "lower" function on the column in the order by clause solves the problem.
-
CASE Statement order of precedence
The question i have is in regards to the CASE statement.
If i have the following CASE statement in a calculation, and use the calculation to populate the column header, it returns 2 columns, one for 'Mexico' and one for 'Exclude' - That is good
Statement 1:
CASE WHEN ( "Customers (Sales History)".Country = 'MX' )
THEN 'Mexico'
ELSE 'Exclude'
END
So i have sucessfully extracted out sales from Mexico, now i want break those sales into 2 categories, 'Primary' and 'Secondary'. If i use the below case statement, I was expecting to get 3 column headers, one for 'Primary' one for 'Secondary' and one for 'Exclude', but instead I only get 1 column header for exclude. Im sure it has something to do with order of precedence, but could someone explain the logic of why discover handles it this way, and how to get around it?
Statement 2:
CASE WHEN ( "Customers (Sales History)".Country = 'MX' )
THEN
CASE WHEN ( Item Groups.Sales Type Id <> 3)
THEN 'Primary'
ELSE 'Secondary'
END
ELSE 'Exclude'
END
As a side note, if i use statement 2 and set a condition "Statement 2 <> 'Exclude'" , the result will be the columns 'Primary' & 'Secondary'
Thanks
ChrisHi,
Can anyone tell me how to use a fast formula in discoverer-desktop [for reporting]. Currently, we have a disco-report that calcuates the 'monthly salary', but we don't want to use that. Instead, we have a custom fast-formula [xx_oab_monthly_salary] which has the conditions and calculations that we need.
I want to use that formula in discoverer-desktop directly and get the monthly-salary.. i.e., someone needs to create a folder under the business area and add it i believe.. the formula internally calls a function.
when i checked about this with my dba - he said, he can add the 'function', but not the formula. and i need to write the calculation part...
does anyone know how to add it...there shud a way right...
i do not have access to the technical-stuff here..
someone said ["you can wrap the FF_EXEC.run_formula call into your own pl/sql function and map this function into the EUL so that the formula can be called from a workbook.", but this talks about pl/sql-do we need pl/sql
for this].
also, someone else said [ some fast formulas need specific contexts to be set. Depending on whether the fast formula below the only fast formula that you want to recreate in Discoverer.
For a single formula, in general my recommendation is to recreate the fast formula instead of using the ff_exec call].
any quick answers greatly appreciate..
thx, -
Case insensitive ordering in an interactive report
How would I alter the interactive report so that the inbuilt ordering will order alphabetically, regardless of case?
the default behaviour seems to be that it orders using lower a-z and then upper a-z.a long time ago (...) I created a solution where I modified the column headers. If you hover over a column header with the mouse, you see that it is a generated link. I also created a hidden column, but modified the header of the visible link so that it refers to the hidden column.
Not too sure if it's easy to als make it sort asc/desc alternating, but you should be able to do at least an asc sorting with not much trouble. -
Have you gotten your iPhone 6 Plus you pre-ordered on 9/12?? I'm still waiting...till the end of OCTOBER! Because, I billed half to my account, as the system LET me do this and the other half to my debit card. Well they tried to take out the FULL PURCHASE PRICE on 9/23. It didn't go thru and they cancelled the order! I NEVER GOT ANY EMAIL from Verizon! I called this evening to find out the status of my order. Was told that since the device is on backorder, I cannot Bill to Account!!!! I am BEYOND LIVID! I realize that it's "JUST A PHONE' BUT, I should have had my device by Friday! NOW, I have to wait another month at best. I do NOT have credit cards and since this phone is on backorder, will have to wait another week before I can order it and by that time, it'll be CHRISTMAS before I can order a phone. Who knows, I may just save that money and CANCEL EVERY SINGLE LINE on my account. Three will be Month to month so NO ETF's with those lines!
its a bunch of **. they charged my credit card on sunday, my status still says no payment, no tracking #, they told me my phone was going to ship monday and I've gotten a different story every day since. today they told me they shipped out all the phones and are waiting for more to come in...blah blah blah. i ordered on 9/12 and my friend that ordered the same exact phone on 9/19 got his on tuesday and laughed at me for preordering. I'm very frustrated!
-
I've begun to notice that not all apps support case-sensitive partitions. I know that repartitioning or reformatting will just wipe everything and conversions don't usually work because of naming overlaps. But I had an idea. What if I created a second, case-insensitive partition? You see I have 100GB free. So if I create a 100GB partition, move 100GBs over, resize the partition into the new free space and repeat. Soon I would have all my files moved onto a new case-insensitive partition, and I could delete the old one and completely take it's place.
The only problem I see is the OS. I know the files won't mind the move, but the OS I'm sure is a problem. Maybe I could make the 2nd partition, install mac on it, and then move my other files over bit by bit, resizing the partition as I go. Is there a way to import my prefs and settings from an adjoining partition?
I just want to know what the problems with my idea might be. Is it risky? Am I a mad man?Yes. Just select the volume in Disk Utility and select erase. Case-sensitivy is selectable. However, I've never understood the PC case-sensitivity usage and would never recommend it. Finally, AFAIK, the OS handles either.
-
CAF case insensitve search using QueryFilter
Is it possible to do case insensitive search in CAF using QueryFilter? By default it does case sensitive searches in data elements of Entity Services.
I am using 7.0.
Also according to
http://help.sap.com/saphelp_nw70/helpdata/en/44/6359a603b13674e10000000a114a6b/content.htm
The code below searches between these 2 strings... What does that mean?
QueryFilter("STRING_SAMPLE", "!=");Hi,
QueryFilter("Hello", "Bye");
is true if the data queried is equal to one of the two values (or equal to "Hello" or equal to "Bye").
hope been helpful,
best regards,
Marco. -
CAF case insensitve search QueryFilter
Is it possible to do case insensitive search in CAF using QueryFilter? By default it does case sensitive searches in data elements of Entity Services.
I am using 7.0.
Also according to
http://help.sap.com/saphelp_nw70/helpdata/en/44/6359a603b13674e10000000a114a6b/content.htm
The code below searches between these 2 strings... What does that mean?
QueryFilter("STRING_SAMPLE", "!=");Hi,
QueryFilter("Hello", "Bye");
is true if the data queried is equal to one of the two values (or equal to "Hello" or equal to "Bye").
hope been helpful,
best regards,
Marco. -
Help with CASE ORDER BY...
Need to use a CASE in my order by..similiar to sql server syntax. It works fine in sql server but am getting strange errors in oracle.
Can someone look at my sql order:
CREATE OR REPLACE PROCEDURE RSP_RELEASE_TASKS_BY_WEEK
IN_SUBJECT IN varchar2 :=NULL,
IN_AUTHOR IN varchar2 :=NULL,
IN_PROJECTNAME IN varchar2 :=NULL,
IN_CATEGORY varchar2 :=NULL,
IN_STARTDATE date :=NULL,
IN_ENDDATE date :=NULL,
p_cursor out types.sqlcur
AS
BEGIN
SELECT
To_Char(pt.EXPECTED_START_DATE, 'ww') AS WEEKNUMB,
pt.TEXT_29,
COUNT(pt.TEXT_29) as CountOfTask
FROM
PROJ_TASK pt
INNER JOIN
PROJECT p ON
p.PROJECTID=pt.PROJECTID
WHERE
(pt.EXPECTED_START_DATE BETWEEN IN_STARTDATE AND IN_ENDDATE OR IN_STARTDATE IS NULL)
AND (p.SUBJECT = IN_SUBJECT OR IN_SUBJECT IS NULL OR IN_SUBJECT='All')
AND (p.AUTHOR = IN_AUTHOR OR IN_AUTHOR IS NULL OR IN_AUTHOR='All')
AND (p.PROJECTNAME = IN_PROJECTNAME OR IN_PROJECTNAME IS NULL OR IN_PROJECTNAME='All')
AND (IN_CATEGORY IS NULL OR p.CATEGORY = IN_CATEGORY OR IN_CATEGORY='All')
AND (pt.TASK_TYPE = 0)
AND (pt.TASK_STATUS <> 2)
AND (p.PROJECT_TYPE = 2)
AND
pt.TEXT_29= 'RLL-M' OR
pt.TEXT_29='RXLL' OR
pt.TEXT_29='RLL-E' OR
pt.TEXT_29='BOM-E' OR
pt.TEXT_29='RLL-F' OR
pt.TEXT_29='R-GM' OR
pt.TEXT_29='BOM-F' OR
pt.TEXT_29 = 'BOM-M' OR
pt.TEXT_29 = 'REC' OR
pt.TEXT_29= 'S-BOM-M' OR
pt.TEXT_29='S-BOM-E' OR
pt.TEXT_29='S-REC'
AND pt.TASK_STATUS <> 2
GROUP BY
To_Char(pt.EXPECTED_START_DATE, 'ww'), pt.TEXT_29;
ORDER BY
CASE
WHEN pt.TEXT_29 = 'BOM-E' THEN 'a'
WHEN pt.TEXT_29 = 'BOM-M' THEN 'b'
WHEN pt.TEXT_29 = 'BOM-F' THEN 'c'
WHEN pt.TEXT_29 = 'R-GM' THEN 'd'
WHEN pt.TEXT_29 = 'RLL-E' THEN 'e'
WHEN pt.TEXT_29 = 'RLL-F' THEN 'f'
WHEN pt.TEXT_29 = 'RLL-M' THEN 'g'
WHEN pt.TEXT_29 = 'RXLL' THEN 'h'
WHEN pt.TEXT_29 = 'REC' THEN 'i'
WHEN pt.TEXT_29 = 'S-BOM-M' THEN 'j'
WHEN pt.TEXT_29 = 'S-BOM-E' THEN 'k'
WHEN pt.TEXT_29 = 'S-REC' THEN 'l'
END, To_Char(pt.EXPECTED_START_DATE, 'ww'), pt.TEXT_29;
END;
/Thanks,
JonThose errors are strange, I have never seen invisible errors before.
In theory case in order by works
SQL> select * from dual
2 order by case when 1 = 1 then 'a'
3 when 1 = 2 then 'b' end;
D
X
Maybe you are looking for
-
Can we solve this with TSQL? Complex Query
Hi all I have the table below. A cursor based batch job needs to transverse the table. Here are the requirement. The ProduktIDs are in pairs. For Fish1(E7C2191CF) i.e TableID 1 & 2 I am only interested in Rate marked yellow. E.g for a given TableID,
-
Hi, i use OLE-Word to create a table in a word document and fill them. That's work OK, but i will position the table on a specific Positon on the page. Position shell be horizontal 7 and vertical 8. I have tried it with recording in word, bot i don't
-
Popup window display issue ???
I want to have a button the with launch a poup window. I know how to do this put what I do not know how to do is have no site display info in the new pop up window. I have done a normal pop up window but it has the address bar in it and on the top of
-
How can I uninstall iTunes from my PC and update my iPhone software?
I've been trying to update my iPhone 4 from iOS 4.1 to the newest version but I've encountered problem after problem. First when I tried to update it through iTunes it said 'it cannot be restored at this time because the iPhone software update server
-
I have MacOS 10.5.8. It is not booting. It stops at the blue screen. I used the disc utility - verify disc. I get the following message - Invalid sibling link. Volume check failed. Error: Filesystem verify or repair failed. Please give a solution any